Skip to content

Commit

Permalink
Fix Style/PreferredHashMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
dks17 committed Mar 25, 2018
1 parent b1772d2 commit a0e8b64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/devise_token_auth/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a0e8b64

Please sign in to comment.