Rails 3 - Devise : How to skip the 'current_password' when editing a registration?
Similar to above, try putting this in your user model:
# bypasses Devise's requirement to re-enter current password to edit
def update_with_password(params={})
if params[:password].blank?
params.delete(:password)
params.delete(:password_confirmation) if params[:password_confirmation].blank?
end
update_attributes(params)
end
The following worked for me:
In my users controller, in the update action, I have
params[:user].delete(:password) if params[:user][:password].blank?
params[:user].delete(:password_confirmation) if params[:user][:password_confirmation].blank?
Perhaps you could adapt that to a before_save
callback?