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 += " #{name}".html_safe elsif link==:submit genlink += "#{name}".html_safe elsif link == :back genlink = "#{name}".html_safe else genlink = "#{name}".html_safe end @actionMenuItems << genlink.html_safe end end end