I only want to be able to check for the password at create time to
confirm if it is present.
at update time if someone enters the password it should still match the
size limit but it they do not enter the password then it should not be
looked at.
in my controller i have already added:
params[:user].delete(:password) if params[:user][:password].blank?
params[:user].delete(:password_confirmation) if
params[:user][:password].blank? and
params[:user][:password_confirmation].blank?
to take care of any issue coming from that side.
any help or suggestion will be greatly appriciated.
I only want to be able to check for the password at create time to
confirm if it is present.
at update time if someone enters the password it should still match the
size limit but it they do not enter the password then it should not be
looked at.
My sense is that what is tripping things up is that on update and nil password, it is not checking precence but is still checking length and confirmation. It may not be the best way but I tend to use an :if => :method_name, and then in that method check for new_record, etc.