Forum: Ruby on Rails error_messages_for not working

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sahil D. (Guest)
on 2009-06-06 11:17
(Received via mailing list)

i am trying to save an object with 2 associated objects:
Organisation has_many :users
                      has_many :addresses

def new
  @org =
  @user =
  @address =

 <%= 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?


This topic is locked and can not be replied to.