Skip to content

Commit

Permalink
Add submenu class to submenu action.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bleigh committed Nov 16, 2009
1 parent 303d257 commit b752abf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/pkg/*
4 changes: 2 additions & 2 deletions lib/uberkit/menu.rb
Expand Up @@ -60,9 +60,9 @@ def submenu(name, options = {}, html_options = {}, &block)

if subnav.actions.any?
if options == :delegate
@actions << [@template.link_to(name, subnav.actions.first[1][:url]) + subnav.to_html, {:current => subnav.any_current?, :url => subnav.actions.first[1][:url]}, options]
@actions << [@template.link_to(name, subnav.actions.first[1][:url]) + subnav.to_html, {:current => subnav.any_current?, :url => subnav.actions.first[1][:url]}, {:class => 'submenu'}.merge(options)]
else
@actions << [@template.link_to(name,options,html_options) + subnav.to_html, {:current => subnav.any_current?, :url => options}, options] if subnav.actions.any?
@actions << [@template.link_to(name,options,html_options) + subnav.to_html, {:current => subnav.any_current?, :url => options}, {:class => 'submenu'}.merge(options)] if subnav.actions.any?
end
end
end
Expand Down

0 comments on commit b752abf

Please sign in to comment.