Ruby on Rails Wednesday, September 25, 2013

Hi Everyone, 

I have done my first MVP in rails, an invoicing application,https://github.com/pietrop/simpleinvoice

So at the moment when I create an invoice, (I use the active record find or create method for defining the client on creation of the invoice) it pulls up the client details, the bank details of the user, and the user details as pre-populated editable fields, the user only needs to add the services and the invoice is done.

Where is the problem?

if the user creates a second invoice and edits any of those pre-populated details(client, bank, and user details) it changes on all of the invoices. and in this context it creates inaccurate unreliable historic records.

What would you recommend is the best way to sort this out in Rails?

Best

Pietro



-- 
Pietro Passarelli | UK:  +44 79 36 180 742 | ITA: + 39 340 2157225 | www.pietropassarelli.com

On 25 Sep 2013, at 08:48, rubyonrails-talk@googlegroups.com wrote:

Group: http://groups.google.com/group/rubyonrails-talk/topics

    Ricardo do Valle <ricardodovalle@gmail.com> Sep 24 03:44PM -0300  

    Hi everyone,
     
    I need that my web app talk with a dektop application.
     
    User case: a user click a button on the page, and this button send a
    command to the desktop app and wait for the answer from ...more

    Back to top.

    Colin Law <clanlaw@googlemail.com> Sep 24 09:08PM +0100  

    > Hi everyone,
     
    > I need that my web app talk with a dektop application.
     
    Which computer is the web application running on (not the browser, the
    rails server)?
     
    Colin
     
    ...more

    Back to top.

    Ricardo do Valle <ricardodovalle@gmail.com> Sep 25 01:09AM -0300  

    @Colin the rails server is running in a VPS with nginx and unicorn.
     
    @Fernando, thank you very much, but it is not alternative for this project,
    i will study the chrome devs API for a future and ...more

    Back to top.

    Robert Walker <lists@ruby-forum.com> Sep 25 08:58AM +0200  

    Ricardo do Valle wrote in post #1122365:
     
    > I am looking for a way to create sockets and controls (state machine)
    > from
    > a rails app or another way to do that.
     
    You do realize that what you're ...more

    Back to top.

    Josh Jordan <josh.jordan@gmail.com> Sep 24 05:19AM -0700  

    The justification for this change seems preposterous. Why would anyone
    think that, in the former example, the database has changed? The method
    called there is named "select!".
    ...more

    Back to top.

    George Georgiev <georgiev@heatbs.com> Sep 24 10:48PM -0700  

    Thank you Matt!!
    Now I see my own confusion - I was convinced that these two snippets are
    identical in Rails 3 (Well, they are - JUST in MY case)
     
    When they do the same thing - when the ...more

    Back to top.

    Dave Freireich <davef@coresearchinc.com> Sep 24 08:52AM -0700  

    This is a consulting role, 3-6 month extendable engagements, W2 only
    through Core Search Group.
     
    Think you can design/build for high performance RoR/Python web
    infrastructure that serves tens of ...more

    Back to top.

    Fai Wong <wongwf82@gmail.com> Sep 24 07:55AM -0700  

    What is the best way to convert a currency string 'USD' to locale :en-US?
    Right now trying to make it flexible to show the money and symbol correctly
    based on the currency string (like 'USD' or ...more

    Back to top.

    Walter Lee Davis <waltd@wdstudio.com> Sep 24 11:58AM -0400  

    You could make a helper that would extract this value from the user and translate the display string. If you set up a hash like {'USD' => :en-US, 'GBP' => :en-BG, ...} then there would be one place to ...more

    Back to top.

    Peter Hickman <peterhickman386@googlemail.com> Sep 24 08:41PM +0100  

    Hang on do you mean to convert USD 1000 into AUD 1000? Surely you would
    need to do a currency conversion because USD 1000 is AUD 1064. This would
    seem to have nothing to do with locales at all.
     
    ...more

    Back to top.

    Walter Lee Davis <waltd@wdstudio.com> Sep 24 03:45PM -0400  

    I just saw a gem on RubyFlow last week that handles currency conversions using Google as a data source. If that's what you're after, forget what I said and use that.
     
    Walter
     
    On Sep 24, 2013, at ...more

    Back to top.

    Alex A <malusalexandru@gmail.com> Sep 24 04:17AM -0700  

    I'm using Rails version 3.2 and Ruby 1.9.3
     
    I'm trying to make within a form_tag a datepicker field. In my GemFile I
    have added gem 'jquery-rails' and gem 'jquery_datepicker'. In the rails ...more

    Back to top.

    BalaRaju Vankala <foreverbala4u@gmail.com> Sep 24 09:56PM +0530  

    I think you have to add script for datepicker
    Just like below
     
    $(function() {
    $(".date_picker").datepicker({
    dateFormat : 'd M, yy',
    minDate : 0,
    maxDate : +90
    }); ...more

    Back to top.

    Genadi Samokovarov <gsamokovarov@gmail.com> Sep 24 04:24AM -0700  

    Please, do so! Would appreciate any feedback :)
     
    On Saturday, September 21, 2013 1:52:06 AM UTC+3, tamouse wrote:
    ...more

    Back to top.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/20cf303b3c0119aefc04e7307a21%40google.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment