Mauro
2011-Jan-23 10:38 UTC
how can I set attribute of join model in a has many through association?
I have: class Ruser < ActiveRecord::Base has_many :deliveries has_many :bags, :through => :deliveries class Bag < ActiveRecord::Base has_many :deliveries has_many :rusers, :through => :deliveries class Delivery < ActiveRecord::Base belongs_to :ruser belongs_to :bag Delivery has an extra attribute :delivered_at of type date. I have Ruser and Bag already populated. I want to assign bags to rusers simultaneously setting delivered_at. Doing user.bags << bags doesn''t allow to set delivered_at. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.