summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2008-11-08 00:12:43 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2008-11-08 00:12:43 +0000
commit81eee10d5b000d4eb74dbe900a92e033a7ec56e9 (patch)
treefcdf84f9c7648b1baad2c7bd2d0a536023a69123
parent63c72fe87f901a6a9f6ff1981a4e93a366be05f1 (diff)
downloadredmine-81eee10d5b000d4eb74dbe900a92e033a7ec56e9.tar.gz
redmine-81eee10d5b000d4eb74dbe900a92e033a7ec56e9.zip
Removing the custom Redmine hook in routes in favor of Engine's hook.
* 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
-rw-r--r--config/routes.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index b506b6c10..0a4d3fd9f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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'