> 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
--
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.
No comments:
Post a Comment