On 5 August 2014 09:46, Jaimin Pandya <lists@ruby-forum.com> wrote:
>> You have not shown us the code where you set expensescounter_id, or
>> the code that you expect that value to be set. You have shown us the
>> code where expenses_counter.id would be setup but presumably
>> expensescounter_id is an attribute of a different object.
>
> I following "Agile web development with rails 3.2" book.
>
> Yes, expensescounter_id is an attribute.
>
> I use that attribute in line_item.rb file like as follow:
>
> class LineItem < ActiveRecord::Base
> attr_accessible :quantity_id, :expensescounter_id
>
> belongs_to :quantity
> belongs_to :expensescounter
> end
expensescounter_id should be set when you add the expensescounter to
the lineitem. That is the code you need to debug, or show us.
Colin
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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/bcbb3bf8a4a75ed671469a229623eb1e%40ruby-forum.com.
> For more options, visit https://groups.google.com/d/optout.
--
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/CAL%3D0gLuhBsZ04kQ1HRG_rDm4hn3j-z-7eSgvNBq0hnDab0AN5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment