Module: MetaPresenter::Helpers
- Defined in:
- lib/meta_presenter/helpers.rb
Overview
Including this module in your controller will give your views access to a ‘presenter` method that delegates to controller methods
class ApplicationController < ActionController::Base
include MetaPresenter::Base
end
class ApplicationMailer < ActionMailer::Base
include MetaPresenter::Base
end
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/meta_presenter/helpers.rb', line 18 def self.included(base) base.instance_eval do # Sets up the `presenter.` method as helper within your views # If you want to customize this for yourself just alias_method it helper_method :presenter end end |