Admin can change other users settings without user password #2646

This commit is contained in:
Priit Tark 2015-06-03 16:34:37 +03:00
parent 13b60d39ce
commit 4da89aaa87
9 changed files with 67 additions and 81 deletions

View file

@ -29,6 +29,7 @@ class Admin::ApiUsersController < AdminController
def edit; end
def update
params[:api_user].delete(:password) if params[:api_user][:password].blank?
if @api_user.update(api_user_params)
flash[:notice] = I18n.t('record_updated')
redirect_to [:admin, @api_user]