When setting up the root route, is there any compelling reason to choose this syntax:
map.root :controller => "login", :action => 'show'
over this syntax:
match "/" => "login#show"
The second syntax will allow you to use the :constraints option, where the first wont. Is there any reason to use the first option?
When you use
root :torails 3 automatically creates the helper methods root_url and root_path for referencing your application root. These methods are often used in gems to reference your applications root and I’m not actually sure where these would point or if they would even work if you don’t specify anything (never tried it). Plus it’s the “rails way” of doing things so it’s usually best to follow unless you have a really good reason.