Module: Buoys::Helper
- Defined in:
- lib/buoys/helper.rb
Instance Method Summary collapse
-
#buoy(key, *args) ⇒ Object
(also: #breadcrumb)
Declare the breadcrumb which want to render in view.
-
#buoys ⇒ Object
(also: #breadcrumbs)
<% buoys.tap do |links| %> <% if links.any? %> <ul> <% links.each do |link| %> <li class=“<%= link.class %>”> <%= link_to link.text, link.url %> </li> <% end %> </ul> <% end %> <% end %>.
- #buoys_renderer ⇒ Object
Instance Method Details
#buoy(key, *args) ⇒ Object Also known as:
Declare the breadcrumb which want to render in view.
<%= buoy :help, true %>
6 7 8 |
# File 'lib/buoys/helper.rb', line 6 def buoy(key, *args) @_buoys_renderer = Buoys::Renderer.new(self, key, *args) end |
#buoys ⇒ Object Also known as:
<% buoys.tap do |links| %>
<% if links.any? %>
<ul>
<% links.each do |link| %>
<li class="<%= link.class %>">
<%= link_to link.text, link.url %>
</li>
<% end %>
</ul>
<% end %>
<% end %>
22 23 24 |
# File 'lib/buoys/helper.rb', line 22 def buoys buoys_renderer.render end |