module MetaPresenter::Helpers
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
Private Instance Methods
presenter()
click to toggle source
Initialize presenter with the current controller
# File lib/meta_presenter/helpers.rb, line 28 def presenter @presenter ||= begin controller = self klass = MetaPresenter::Builder.new(controller, action_name).presenter_class klass.new(controller) end end