SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Root Routing
-
Feb 13, 2009, 11:50 #1
- Join Date
- Aug 2003
- Location
- Southern California, United States
- Posts
- 1,616
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Root Routing
Is there a way I can map the root to a certain controller so I don't have to manually enter the controller and action for each root page?
I am using this for my root class pages:
Code Ruby:map.connect 'what', :controller => 'pages', :action => 'what' map.connect 'faq', :controller => 'pages', :action => 'faq' map.connect 'about', :controller => 'pages', :action => 'about' map.connect 'contact', :controller => 'pages', :action => 'contact'
Have a good day.
-
Feb 13, 2009, 22:54 #2
If you use:
map.root
Then that will be the root route.
http://amrkamel.wordpress.com/2008/0...e-in-rails-20/Justin Palmer
MySQL v.5
-
Feb 15, 2009, 07:27 #3
- Join Date
- Mar 2008
- Location
- Berchtesgaden, Germany
- Posts
- 32
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks