Saurabh Peshkar wrote:
> Hi Preksha,
> 
> Are you using '.build' parameters.
> 
> (e.g. @club = Club.new
> @user = @club.users.build(params[:user]) for one(club) to many(users) 
> relations)
> 
> and in view page
> 
> specify <%= error_messages_for :club, :user%>
> 
> Hope this might help.
> 
> Saurabh

hi Saurabh

there is one-to-one relationship between club and user..
and in club model i have used both
validates_associated :user
validates_presence_of :user_id, :message => nil
then also it is not working..

and in view page i already specified error_messages_for..
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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