Commit 22e7f8ff authored by Veselin Todorov's avatar Veselin Todorov

Fixing an issue in users#update when password is not present.

parent 3c9d7b70
...@@ -38,7 +38,7 @@ class Admin::UsersController < ApplicationController ...@@ -38,7 +38,7 @@ class Admin::UsersController < ApplicationController
def update def update
admin = params[:user].delete("admin") admin = params[:user].delete("admin")
if params[:user][:password].empty? if params[:user][:password].blank?
params[:user].delete(:password) params[:user].delete(:password)
params[:user].delete(:password_confirmation) params[:user].delete(:password_confirmation)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment