##// END OF EJS Templates
Converted Menus to a Tree structure to allow submenus....
Converted Menus to a Tree structure to allow submenus. * Bundle the rubytree gem * Patched RubyTree's TreeNode to add some additional methods. * Converted the menu rendering to walk the Tree of MenuItems to render each item * Added a menu option for :parent_menu to make this menu a child of the parent * Added a bunch of tests * Made MenuItem a subclass of Tree::TreeNode in order to use it's methods directly * Changed the exceptions in MenuItem#new to be ArgumentErrors instead of the generic RuntimeError #4250 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3090 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2823:6456f7c4a481
r2976:1f06cf889990
Show More
query_exemplar.rb
9 lines | 175 B | text/x-ruby | RubyLexer
class Query < ActiveRecord::Base
generator_for :name, :method => :next_name
def self.next_name
@last_name ||= 'Query 0'
@last_name.succ!
@last_name
end
end