module Resubject::Helpers
ActionController helpers
In case you have Rails, these helpers will be automatically included
Public Class Methods
included(base)
click to toggle source
adds present as a helper method in the controller
# File lib/resubject/rails/helpers.rb, line 8 def self.included(base) base.send(:helper_method, :present) end
Public Instance Methods
present(objects, *presenters) { |p| ... }
click to toggle source
@see Builder.present
# File lib/resubject/rails/helpers.rb, line 13 def present(objects, *presenters) presenters = Builder.present(objects, view_context, *presenters) presenters.tap do |p| yield p if block_given? end end