Rebuild rubocop TODOs after auto-correcting
This commit is contained in:
parent
31c50255e9
commit
84dbb52d11
580 changed files with 3689 additions and 3133 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class UsersController < Admin::BaseController
|
||||
load_and_authorize_resource
|
||||
|
|
@ -36,9 +38,9 @@ module Admin
|
|||
# Variable @show_attributes holds the attributes that are visible for the 'show' action
|
||||
# If you want to change the attributes that are shown in the 'show' action of users
|
||||
# add/remove the attributes in the following string array
|
||||
@show_attributes = %w(name email username nickname affiliation biography registered attended roles created_at
|
||||
@show_attributes = %w[name email username nickname affiliation biography registered attended roles created_at
|
||||
updated_at sign_in_count current_sign_in_at last_sign_in_at
|
||||
current_sign_in_ip last_sign_in_ip)
|
||||
current_sign_in_ip last_sign_in_ip]
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
@ -49,7 +51,7 @@ module Admin
|
|||
end
|
||||
end
|
||||
|
||||
if @user.update_attributes(user_params)
|
||||
if @user.update(user_params)
|
||||
redirect_to admin_users_path, notice: "Updated #{@user.name} (#{@user.email})!" + message
|
||||
else
|
||||
redirect_to admin_users_path, error: "Could not update #{@user.name} (#{@user.email}). #{@user.errors.full_messages.join('. ')}."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue