diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b3d0bae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pkg/* diff --git a/lib/uberkit/menu.rb b/lib/uberkit/menu.rb index 1eadb47..89c2ed3 100644 --- a/lib/uberkit/menu.rb +++ b/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