Project

General

Profile

Actions

Feature #6426

closed

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

Added by Eric Davis over 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:
Start date:
2010-09-17
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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'
Actions #1

Updated by Eric Davis over 13 years ago

  • Assignee deleted (Eric Davis)
Actions #2

Updated by Jean-Philippe Lang over 9 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from MenuManager::MenuItem should support a resource route as a url to MenuManager::MenuItem should support a named route as a url
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version changed from Unplanned backlogs to 3.0.0
  • Resolution set to Fixed
Actions

Also available in: Atom PDF