Right now, users can edit some their attributes without having to enter their password because my validations are set up like this:
validates :password, :prese
I was having the same problem. I wasn't able to fix it with
params[:user].delete(:password) if params[:user][:password].blank?
I have only been able to get it to work by doing "update_attribute" on each item individually, e.g.
if ( @user.update_attribute(:name, params[:user][:name]) &&
@user.update_attribute(:email, params[:user][:email]) &&
@user.update_attribute(:avatar, params[:user][:avatar]) &&
@user.update_attribute(:age, params[:user][:age]) &&
@user.update_attribute(:location, params[:user][:location]) &&
@user.update_attribute(:gender, params[:user][:gender]) &&
@user.update_attribute(:blurb, params[:user][:blurb]) )
flash[:success] = "Edit Successful."
redirect_to @user
else
@title = "Edit user info"
render 'edit'
end
which is clearly a total hack but its the only way I can figure it out without messing with the validations and deleting the password!