i am trying to save an object with 2 associated objects:
Organisation has_many :users
@org = Organisation.new
@user = @org.users.build
@address = @org.addresses.build
<%= error_messages_for ‘organisation’, ‘user’, ‘address’ %>
But, this shows me just the error messages for the organisation. and if
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?