Skip to content

Commit

Permalink
Merge pull request #1850 from SidharthBansal/new
Browse files Browse the repository at this point in the history
Fix Style/ReductantReturn rubocop
  • Loading branch information
Ana06 committed Dec 4, 2017
2 parents 05735a7 + 020dae3 commit 666f5ab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
10 changes: 0 additions & 10 deletions .rubocop_todo.yml
Expand Up @@ -638,16 +638,6 @@ Style/RedundantParentheses:
Exclude:
- 'app/controllers/admin/base_controller.rb'

# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/helpers/format_helper.rb'
- 'app/helpers/paths_helper.rb'
- 'app/helpers/users_helper.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Expand Up @@ -66,7 +66,7 @@ def tracks(conference)
else
ts = all.join
end
return ts
ts
end

def difficulty_levels(conference)
Expand All @@ -80,7 +80,7 @@ def difficulty_levels(conference)
else
ts = all.join
end
return ts
ts
end

def unread_notifications(user)
Expand Down
8 changes: 4 additions & 4 deletions app/helpers/format_helper.rb
Expand Up @@ -101,17 +101,17 @@ def label_for(event_state)

def icon_for_todo(bool)
if bool
return 'fa fa-check'
'fa fa-check'
else
return 'fa fa-times'
'fa fa-times'
end
end

def class_for_todo(bool)
if bool
return 'todolist-ok'
'todolist-ok'
else
return 'todolist-missing'
'todolist-missing'
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/helpers/paths_helper.rb
Expand Up @@ -5,9 +5,9 @@ module PathsHelper

def active_nav_li(link)
if current_page?(link)
return 'active'
'active'
else
return ''
''
end
end
end
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Expand Up @@ -18,7 +18,7 @@ def omniauth_configured
providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank?
end

return providers.uniq
providers.uniq
end

# Receives a hash, generated from User model, function get_roles
Expand Down

0 comments on commit 666f5ab

Please sign in to comment.