Sha256: da17742d2a2c8989dca0c3f0e7d7d0f05f296bcbed1bfb36c254d7b582b55ada

Contents?: true

Size: 294 Bytes

Versions: 5

Compression:

Stored size: 294 Bytes

Contents

module MountainView
  module ComponentHelper
    def render_component(slug, properties = {}, &block)
      component = MountainView::Presenter.component_for(slug, properties)
      component.render(controller.view_context) do
        capture(&block) if block_given?
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mountain_view-0.12.3 app/helpers/mountain_view/component_helper.rb
mountain_view-0.12.2 app/helpers/mountain_view/component_helper.rb
mountain_view-0.12.1 app/helpers/mountain_view/component_helper.rb
mountain_view-0.12.0 app/helpers/mountain_view/component_helper.rb
mountain_view-0.11.0 app/helpers/mountain_view/component_helper.rb