Sha256: 37c810cab8f45392c234f6b15278ffcb3c747c52e77e9ebde2126d8b5f77cfa5
Contents?: true
Size: 872 Bytes
Versions: 4
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 = @lookup_context.prefixes + blocks.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
4 entries across 4 versions & 1 rubygems