Skip to content
Browse files

Add submenu class to submenu action.

  • Loading branch information...
1 parent 303d257 commit b752abf2549493ee2868c871abf71003fbc84f2a Michael Bleigh committed Nov 15, 2009
Showing with 3 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 lib/uberkit/menu.rb
View
1 .gitignore
@@ -0,0 +1 @@
+/pkg/*
View
4 lib/uberkit/menu.rb
@@ -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

0 comments on commit b752abf

Please sign in to comment.
Something went wrong with that request. Please try again.