The Passionate Craftsman

Ruby, PHP, MySql, Software engineering and more.

Friday 23 October 2009

Rails default route

If yuo want to map your Rails' root directory, something like www.example.com/, to a controller, use this directive in your cong/routes.rb:


map.root :controller => 'configurations'


'configurations' is the controller that you might want to map. 'map.root' means 'map the root'.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home