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

This commit is contained in:
Veselin Todorov 2012-01-11 17:21:15 +02:00
parent 3c9d7b7077
commit 22e7f8ffcc

View file

@ -38,7 +38,7 @@ class Admin::UsersController < ApplicationController
def update
admin = params[:user].delete("admin")
if params[:user][:password].empty?
if params[:user][:password].blank?
params[:user].delete(:password)
params[:user].delete(:password_confirmation)
end