refactor, use invalid class
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UsersController < ApplicationController
|
||||
load_and_authorize_resource :user, only: %i[index edit update destroy resend_reset_password]
|
||||
load_and_authorize_resource :user, only: %i[index edit update destroy]
|
||||
|
||||
before_action :build_user, only: %i[new create]
|
||||
authorize_resource :user, only: %i[new create]
|
||||
@@ -71,13 +71,6 @@ class UsersController < ApplicationController
|
||||
redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_removed')
|
||||
end
|
||||
|
||||
def resend_reset_password
|
||||
current_user.send_reset_password_instructions
|
||||
|
||||
redirect_back fallback_location: settings_users_path,
|
||||
notice: I18n.t('you_will_receive_an_email_with_password_reset_instructions_in_a_few_minutes')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def role_valid?(role)
|
||||
|
||||
Reference in New Issue
Block a user