Sha256: 3094835a809f597a33b3ee3303ff0baa23b78c9c4e4ac6db2d27156c1b030120

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

<ul>
  <%tree.branches.each do |branch| 
     if branch.object.is_a?(Lolita::Mapping) 
       branch.options[:url]||=lolita_resources_path(branch.object) 
       active=branch.object.to==resource_class
     else   

       branch.options[:url]=if branch.options[:url].respond_to?(:call) 
         self.instance_eval(&(branch.options[:url])) 
       else 
         branch.options[:url] 
       end 
       active=branch.options[:url]==request.path
     end 
     
    %>
    <li <%=active ? "class='active'" : ""%>>
      <%= link_to branch.title, branch.options[:url] %>
      <% if branch.children.branches.any? %>
        <%= render_component(:"lolita/navigation",:tree,:tree=>branch.children) %>
      <% end %>
    </li>
  <% end %>
</ul>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lolita-3.1.3 app/views/components/lolita/navigation/_tree.html.erb