Sha256: e57c84f6de62b75e07cd8dc6041746b32a2ce636305c6c4fcac03d1f57cf6dcd

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

<%
  # headmin/blocks
  #
  # ==== Required parameters
  # * +blockable</tt> - Object with blocks association
  #
  # ==== Optional parameters
  # * +paths</tt> - Directories where to look for block templates
  #
  # ==== Examples
  #   Basic version. (looks in views/website/blocks, views/blocks or views directory )
  #   <%= render 'headmin/blocks', blockable: @page %#>
  #
  #   Define one ore more path where the templates could be located:
  #   <%= render 'headmin/blocks', blockable: @page, paths: %w(website/pages/blocks) %#>

  blocks = Headmin::BlocksView.new(local_assigns)
  @lookup_context.prefixes = blocks.prefixes + @lookup_context.prefixes
%>

<% if blockable && blockable.respond_to?(:blocks) %>
  <% blockable.blocks.order(:position).each do |block| %>

    <!-- <%= block.name %> -->
    <%= render block.name, block: block %>

  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
headmin-0.5.2 app/views/headmin/_blocks.html.erb