<ol class="tree">
<% for node in nodes %>
  <li>
    <% if params[:allowed_types].include?(node.class.to_s) && node.id != params[:not_branch] && !node.path.include?(params[:not_branch]) %>
      <%= link_to h(node.title), node_path(node), :id => "id-#{node.id}" %>
    <% else %>
      <%= node.title %>
    <% end %>
    <% unless (children = node.children.where(options)).empty? -%>
      <span class="expand">+</span>
      <%= render :partial => 'branch', :locals => { :nodes => children, :options => options } %>
    <% end -%>
  </li>
<% end -%>
</ol>

<ol class="tree">
<% for node in nodes %>
  <li>
    <% if ( params[:allowed_types] && params[:allowed_types].include?(node.class.to_s) ) && node.id != params[:not_branch] && !node.path.include?(params[:not_branch]) %>
      <%= link_to h(node.title), node_path(node), :id => "id-#{node.id}" %>
    <% else %>
      <%= node.title %>
    <% end %>
    <% unless (children = node.children.where(options)).empty? -%>
      <span class="expand">+</span>
      <%= render :partial => 'branch', :locals => { :nodes => children, :options => options } %>
    <% end -%>
  </li>
<% end -%>
</ol>

Check if allowed types parrams exists
Check if allowed types parrams exists
