lib/dynamic_menu.rb in dynamic_menu-2.0.2 vs lib/dynamic_menu.rb in dynamic_menu-3.0.0.pre1

- old
+ new

@@ -1,26 +1,6 @@ -module DynamicMenu - require 'engine' if defined?(Rails) - - module MenuItems - def newmenuitem(name,link,method=:get,confirm="Are you sure?") - if !defined?(@actionMenuItems) - @actionMenuItems = Array.new - end - genlink = "" - - if method==:delete - genlink += "<a href=\"#{link}\" data-confirm=\"#{confirm}\" data-method=\"delete\" rel=\"nofollow\"> - #{name}</a>".html_safe - elsif link==:submit - genlink += "<a href=\"#\" data-submit=\"true\">#{name}</a>".html_safe - elsif link == :back - genlink = "<a href=\"#\" data-back=\"true\">#{name}</a>".html_safe - else - genlink = "<a href=\"#{link}\">#{name}</a>".html_safe - end - @actionMenuItems << genlink.html_safe - end - - - end -end +module DynamicMenu + #require 'rails' + require "dynamic_menu/inheritable_menus.rb" + require "engine.rb" + require "dynamic_menu/base.rb" +end