I would avoid ever using a hash to specify a path. Always use named routes.
If this is your root of your application then try this: # use root_path in your views map.root :controller => "home" # :action => "index" is implied or if not, then create a named route # use home_path in your views map.home 'home', :controller => "home" # again :action => "index" is implied At the end of the day you should remove the following from your routes file: map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' So you never rely on the :controller/:action has in your views. Always use named_routes. HTH, Nicholas On Wed, Jun 17, 2009 at 1:45 PM, zambezi<[email protected]> wrote: > > Thank you Sijo and Nicholas, > > Your much appreciated replies have given me some insight and got me > moving again. The RESTful reading recommendation (RailsGuide) is > excellent and has shed considerable light on what was a murky subject > for me. > > However, one further question regarding the link_to helper. > > Since Rails conserves paths (and breaks routes when mapping > namespaces), I amended the old style link_to method by adding a > forward slash in front of the controller name ('home' to '/home'). > > <%= link_to "Home", {:controller =>'/home', :action =>'index' } %> > > How do I achieve this using the new, improved RESTful helper style? > > Cheers, Bill > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

