Hi,
I tried passing a controller string of "/contacts" instead of "contacts" and this does work (thanks) however I don't quite understand the logic around this relative path behaviour in
routes.rb.
* If the controller itself is contacts_controller.rb and it is in the root (i.e. not a subdirectory) why would one be required to specify "/"
* Conversely what is gained by allowing specification of a relative controller, or more to the point, if one is specified as was the case here what is the logic behind allowing a URL to be greated by
routes.rb that does not match a route? Shouldn't the URL producing mechanism in routes.rb be matching the input parameters against available routes, such invalid URLs are not produced (i.e
. one that doesn't match a route)?
====================================
irb(#<#<Class:0x3775b58>:0x3775b28>):021:0* url_for :controller => "/contacts
"
=> "/en/contacts"
irb(#<#<Class:0x3775b58>:0x3775b28>):022:0> url_for :controller => "contacts
"
=> "/en/active_rbac/contacts"
irb(#<#<Class:0x3775b58>:0x3775b28>):023:0> params
=> {"action"=>"login", "controller"=>"active_rbac/login", "locale"=>"en"}
irb(#<#<Class:0x3775b58>:0x3775b28>):024:0> url_for
=> "/en/active_rbac/login/login"
====================================
Tks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core
-~----------~----~----~----~------~----~------~--~---
- [Rails-core] Re: bug in routes ??? Greg Hauptmann
- [Rails-core] Re: bug in routes ??? Greg Hauptmann
- [Rails-core] Re: bug in routes ??? Greg Hauptmann
- [Rails-core] Re: bug in routes ??? Michael Koziarski
- [Rails-core] Re: bug in routes ??? Mathieu Jobin
- [Rails-core] Re: bug in routes ?... Greg Hauptmann
- [Rails-core] Re: bug in routes ?... Michael Koziarski
- [Rails-core] Re: bug in rout... Greg Hauptmann
- [Rails-core] Re: bug in ... Greg Hauptmann
- [Rails-core] Re: bug in ... Francois Beausoleil
- [Rails-core] Re: bug in ... Greg Hauptmann
