Try Some thing like this On updating Yours model Code is validating presence of confirm_password Which should not be i think. validate_uniqueness_of :login validate_presence_of :password, :name, validate_confirmation_of:confirm_password.
On Mon, Jun 7, 2010 at 12:19 PM, Tushar Gandhi <[email protected]> wrote: > Hi, > I have a member registration form which takes a "Name", "Login", > "Password", "Confirm Password" and "Location". In the user model I have > added the validation > validate_uniqueness_of :login, validate_presence_of :password, :name, > :confirm_password. > > When the member tries to register every thing working fine. I am using > same form for user to edit his information. When the user come to edit > his information we are not allowing the user to edit the password so > that we are hiding those fields. > But whenever user adds some invalid data suppose he hasn't added the > "name" then the error is shown "Name should not be blank" but with that > it also shows that "Password should not be blank". I have checked the > post data don't have the password and confirm password parameter. My > controller code is like this:- > > "@member = User.find(params[:user_id]) > @member.update_attributes(params[:user]) " > Can anyone have any idea how to solve this? > > Thanks > Tushar > -- > 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]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks: Rajeev sharma -- 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.

