Skip to content

Commit

Permalink
we can remove another ternary that was nil in the else.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Sep 6, 2010
1 parent ad4088a commit 4fe73df
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,9 +1,9 @@
<%
css = if ((defined?(apply_css) && apply_css) || !defined?(apply_css)) and
(classes = css_for_menu_branch(menu_branch, menu_branch_counter, sibling_count||=nil.any?))
(classes = css_for_menu_branch(menu_branch, menu_branch_counter, sibling_count||=nil)).any?
" class='#{classes.join(' ')}'"
end
dom_id = (menu_branch.parent_id.nil? and menu_branch.title.present?) ? " id='item_#{menu_branch_counter}'" : nil
dom_id = (" id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?)
-%>
<li<%= css -%><%= dom_id -%>>
<%= link_to menu_branch.title, menu_branch.url %>
Expand Down

0 comments on commit 4fe73df

Please sign in to comment.