diff --git a/.rubocop.yml b/.rubocop.yml index ffc20fec4b2..c80c9bf907a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,7 +10,7 @@ Style/AccessorMethodName: Style/Alias: Description: 'Use alias_method instead of alias.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method' - Enabled: false + Enabled: true Style/AlignArray: Description: >- diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index b9ab6702c53..32981a0e664 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -43,7 +43,7 @@ class WikiPage @attributes[:slug] end - alias :to_param :slug + alias_method :to_param, :slug # The formatted title of this page. def title