Fix Rubocop warnings

This commit is contained in:
Artur Beljajev 2018-07-15 19:26:43 +03:00
parent 02aad0d781
commit a651ac8cab
13 changed files with 26 additions and 20 deletions

View file

@ -32,7 +32,10 @@ module Admin
end
def update
params[:api_user].delete(:plain_text_password) if params[:api_user][:plain_text_password].blank?
if params[:api_user][:plain_text_password].blank?
params[:api_user].delete(:plain_text_password)
end
if @api_user.update(api_user_params)
flash[:notice] = I18n.t('record_updated')
redirect_to [:admin, @api_user]