Module: HasHelpers::BasePresenter::Routing

Defined in:
app/presenters/has_helpers/base_presenter.rb

Class Method Summary collapse

Class Method Details

.routesObject

Returns an object which has the URL helpers for the current Rails application.



8
9
10
11
12
# File 'app/presenters/has_helpers/base_presenter.rb', line 8

def self.routes
  @routes ||= Class.new do
    include Rails.application.routes.url_helpers # Including the helpers will mix in the polymorphic url helper methods in addition to the regular url helpers.
  end.new
end