Skip to content

Commit

Permalink
[CLEANUP] Use a shorter notation for getting the Rails root basename
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee committed Jun 14, 2024
1 parent 27de804 commit 8c25ce7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ Metrics/BlockLength:
Metrics/ClassLength:
Max: 105

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/RootPathnameMethods:
Exclude:
- 'lib/page_title_helper.rb'

# Offense count: 1
Style/MixinUsage:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion lib/page_title_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.interpolate(pattern, *args)
end

def app(env)
env[:app] || I18n.t('app.name', default: File.basename(Rails.root).humanize)
env[:app] || I18n.t('app.name', default: Rails.root.basename.humanize)
end

def title(env)
Expand Down

0 comments on commit 8c25ce7

Please sign in to comment.