aboutsummaryrefslogtreecommitdiffstats
path: root/lib/config/custom-routes.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-30 13:19:22 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-30 13:19:22 +0000
commit4899ae188f728bfd77b6db950fd5a1e3180c7be8 (patch)
tree45523bfd14cd8479462cf790c987bf63d863edef /lib/config/custom-routes.rb
parent7a758a657e10c5b6a11355c9dad205178342096f (diff)
Create stubs for the various points where a user might want to customise Alaveteli via their theme, as per suggestions by @dcabo on [the mailing list](http://groups.google.com/group/alaveteli-dev/msg/f50eba23f75b5c75)
Diffstat (limited to 'lib/config/custom-routes.rb')
-rw-r--r--lib/config/custom-routes.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/config/custom-routes.rb b/lib/config/custom-routes.rb
index 2c1b9cc..b8afebd 100644
--- a/lib/config/custom-routes.rb
+++ b/lib/config/custom-routes.rb
@@ -1,8 +1,17 @@
# Here you can override or add to the pages in the core website
-ActionController::Routing::Routes.draw do |map|
- # Additional help page example
- map.with_options :controller => 'help' do |help|
- help.help_out '/help/help_out', :action => 'help_out'
- end
+
+require 'dispatcher'
+Dispatcher.to_prepare do
+ ActionController::Routing::Routes.draw do |map|
+ # brand new controller example
+ map.with_options :controller => 'general' do |general|
+ general.mycontroller '/mycontroller', :action => 'mycontroller'
+ end
+
+ # Additional help page example
+ map.with_options :controller => 'help' do |help|
+ help.help_out '/help/help_out', :action => 'help_out'
+ end
+ end
end