]> source.dussan.org Git - redmine.git/commitdiff
Removing the custom Redmine hook in routes in favor of Engine's hook.
authorEric Davis <edavis@littlestreamsoftware.com>
Sat, 8 Nov 2008 00:12:43 +0000 (00:12 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sat, 8 Nov 2008 00:12:43 +0000 (00:12 +0000)
* Plugins' routes.rb are now added automatically to Redmine's routing,
  including the ability to override Redmine's default routing.

  Thank you to Jean-Baptiste Barth for the suggestion.  #2142

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1991 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/routes.rb

index b506b6c1084f8677c73413033dcb496ee7d4285d..0a4d3fd9f68f21c591ecb05c2c2ea5465fbf2b80 100644 (file)
@@ -7,7 +7,9 @@ ActionController::Routing::Routes.draw do |map|
   # Keep in mind you can assign values other than :controller and :action
 
   # Allow Redmine plugins to map routes and potentially override them
-  Redmine::Hook.call_hook :routes, :map => map
+  Rails.plugins.each do |plugin|
+    map.from_plugin plugin.name.to_sym
+  end
 
   map.home '', :controller => 'welcome'
   map.signin 'login', :controller => 'account', :action => 'login'