I have a simple form to allow the user to update their password. It
always throws the error saying that the password is too short (they are
over the min of 6 chars). The passwords are making it in to the model
just fine. If I raise an exception within the before_validation user
method the password and password confirmation values both exist, but it
still throws an error.
I do have both the pw and pw_conf as attr_accessible in the users model.
I am stumped to why it is doing this. Any ideas?
@user = current_user
return if request.get?
if @user.update_attributes( :password => params[:password], :password_confirmation => params[:password_confirmation]) flash[:success] = "Your password has been updated." redirect_to admin_user_path(@user) else render :action => :password end