On Tue, Aug 9, 2011 at 1:56 PM, Tomas R. <[email protected]> wrote:

> Users assisting to events are assigned using
>
> @event.users << user
> BUT assistance model also have an status attribute, so I need to fill it
> at the same time of doing @event.users << user, is it possible to make
> it on the same line? I actually dont know how to assign that attribute

http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html

Look for "Association callbacks"

-- 
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to