Hi,
i am trying to save an object with 2 associated objects:
Organisation has_many :users
has_many :addresses
def new
@org = Organisation.new
@user = @org.users.build
@address = @org.addresses.build
end
view:
<%= error_messages_for ''organisation'',
''user'', ''address'' %>
But, this shows me just the error messages for the organisation. and if any
associated object''s validation fails, it just shows me:
users is invalid
addresses is invalid
I haven''t specified validates_associated, in any of the 3 models.
Am i doing something wrong?
Regards
--
Sahil
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---