lib/caboodle/kit.rb in caboodle-0.2.23 vs lib/caboodle/kit.rb in caboodle-0.2.24

- old
+ new

@@ -94,10 +94,12 @@ def name self.to_s.split("::").last end def menu display, path=nil, &block + Settings.menu_items ||= [] + #todo proper slugify slug = display.downcase.gsub(" ","-").gsub("'","") path = "/#{slug}" unless path path = "/" if Site.home_kit == self.to_s.gsub("Caboodle::","") && !Settings.menu_items.include?("/") Caboodle::MenuItems << {:display=>display, :link=>path, :kit=>self} @@ -113,10 +115,9 @@ eval "before do @title = '#{display}' end" - Settings.menu_items ||= [] Settings.menu_items << path end def required keys if keys.class == Array \ No newline at end of file