diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6d8926f09..4c38e730a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -697,13 +697,6 @@ Style/PercentLiteralDelimiters: - 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb' - 'test/lib/generators/devise_token_auth/install_generator_test.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: short, verbose -Style/PreferredHashMethods: - Exclude: - - 'app/controllers/devise_token_auth/registrations_controller.rb' # Offense count: 5 # Cop supports --auto-correct. diff --git a/app/controllers/devise_token_auth/registrations_controller.rb b/app/controllers/devise_token_auth/registrations_controller.rb index c67a040c4..da6f6a211 100644 --- a/app/controllers/devise_token_auth/registrations_controller.rb +++ b/app/controllers/devise_token_auth/registrations_controller.rb @@ -181,9 +181,9 @@ def render_destroy_error def resource_update_method if DeviseTokenAuth.check_current_password_before_update == :attributes 'update_with_password' - elsif DeviseTokenAuth.check_current_password_before_update == :password && account_update_params.has_key?(:password) + elsif DeviseTokenAuth.check_current_password_before_update == :password && account_update_params.key?(:password) 'update_with_password' - elsif account_update_params.has_key?(:current_password) + elsif account_update_params.key?(:current_password) 'update_with_password' else 'update_attributes'