Defect #6426

MenuManager::MenuItem should support a resource route as a url

Added by Eric Davis over 2 years ago. Updated over 2 years ago.

Status:NewStart date:2010-09-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Code cleanup/refactoring
Target version:Unplanned
Affected version:devel Resolution:

Description

Instead of having to always use the controller/action/id hash for a menu item, a resource route should also be allowed.

# init.rb for menus
# Old way
{ :controller => 'contracts', :action => 'show', :id => contract.id, :project_id => project}
# New way
contract_path(project, contract)

Might need to add some more modules/helpers into Redmine::Plugin or MenuItem.

/home/edavis/dev/redmine/redmine-core/vendor/plugins/redmine_contracts/init.rb:37
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2199:in `inject'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:215:in `each'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:215:in `inject'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:215:in `send'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/home/edavis/dev/redmine/redmine-core/vendor/plugins/redmine_contracts/init.rb:33
/home/edavis/dev/redmine/redmine-core/lib/redmine/menu_manager.rb:223:in `call'
/home/edavis/dev/redmine/redmine-core/lib/redmine/menu_manager.rb:223:in `render_unattached_children_menu'

History

#1 Updated by Eric Davis over 2 years ago

  • Assignee deleted (Eric Davis)

Also available in: Atom PDF