Skip to content

Commit

Permalink
Fix Style/NegatedIf
Browse files Browse the repository at this point in the history
  • Loading branch information
dks17 committed Mar 25, 2018
1 parent a0e8b64 commit c3df98a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,6 @@ Style/MutableConstant:
- 'test/dummy/app/controllers/overrides/token_validations_controller.rb'
- 'test/dummy/app/helpers/application_helper.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: both, prefix, postfix
Style/NegatedIf:
Exclude:
- 'app/controllers/devise_token_auth/concerns/set_user_by_token.rb'
- 'app/controllers/devise_token_auth/omniauth_callbacks_controller.rb'

# Offense count: 1
# Cop supports --auto-correct.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def set_user_by_token(mapping=nil)
return @resource if @resource && @resource.is_a?(rc)

# ensure we clear the client_id
if !@token
unless @token
@client_id = nil
return
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def omniauth_failure
# after use. In the failure case, finally, the omniauth params
# are added as query params in our monkey patch to OmniAuth in engine.rb
def omniauth_params
if !defined?(@_omniauth_params)
unless defined?(@_omniauth_params)
if request.env['omniauth.params'] && request.env['omniauth.params'].any?
@_omniauth_params = request.env['omniauth.params']
elsif session['dta.omniauth.params'] && session['dta.omniauth.params'].any?
Expand Down

0 comments on commit c3df98a

Please sign in to comment.