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