ruby-rails-starter
ruby-rails-starter copied to clipboard
Duplicate definition of 'ref' method
The ref
method is defined in two modules, both of which are included in the project ApplicationController
.
The duplicate definitions are here:
- https://github.com/prismicio/ruby-rails-starter/blob/master/app/controllers/prismic_controller.rb#L15
- https://github.com/prismicio/ruby-rails-starter/blob/master/app/helpers/prismic_helper.rb#L29
I believe that defining a method with the same name in two different places is at best confusing and at worst may lead to undesirable application behavior. When calling ref
through the application, it's not clear which ref
is being referred to without use of the debugger.
Therefore, these two methods should have different names for the sake of clarity.
@erwan bump