help with Refinery's view partials

Showing 1-1 of 1 messages
help with Refinery's view partials rbtard 3/25/13 5:34 PM
So I'm trying to learn Ruby, Rails and Refinery all at the same time - ambitious I know :)  I have background more on the front end but I've done some python and django so I am not totally a nub.

In trying to override the way the navigation is constructed, I have come across _header _menu and _menu_branch erb files.
 I think if I could understand what I'm seeing there, especially as regards partials, my understanding will take a leap forward.  

_header.html.erb refers to a partial found in refinery/menu:
<%= render(:partial => "/refinery/menu", :locals => {
            :dom_id => 'menu',
            :css => 'menu'
          }) %>

what is means by locals here?

So i rake override the partial referenced and see an unordered list with reference to another partial, menu_branch

    <%= render :partial => '/refinery/menu_branch', :collection => roots,
               :locals => {
                 :hide_children => hide_children,
                 :sibling_count => (roots.length - 1),
                 :menu_levels => local_assigns[:menu_levels],
                 :apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed.
               } -%>

if i understand correctly, collection => roots is a hash with roots as the value.  Where is the value of roots being set?

This menu_branch partial looks very similar to the partial that referred to it, except the collection is not roots, it's children.

    <ul class='clearfix'>
      <%= render :partial => '/refinery/menu_branch', :collection => children,
                 :locals => {
                   :apply_css => local_assigns[:apply_css],
                   :hide_children => !!hide_children,
                   :menu_levels => local_assigns[:menu_levels]
                 } -%>

At some point it's got to get down to some markup in which the li and anchor tags are rendered.  Where does that code live and can it be overridden as well?  Any insight into the way these partials relate to each other and what is going on here would be much appreciated.