Hi,
I posted a message to rails talk about a problem with requirements option in
routes, without answers:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/9f0dafe1a975de17/96dd4f2fa96ebc75#96dd4f2fa96ebc75
Could anybody please give a hint about where does Rails process :requirements
option in routes? I've been diving in ActionController code but it's big and
I can't find the right point.
Thanks.
Could anybody please give a hint about where does Rails process :requirements
option in routes? I've been diving in ActionController code but it's big and
I can't find the right point.
It's a little crazy because the entire system generates a whole bunch
of code thanks to some performance optimisations in there. The
requirements are used in two places.
* write_generation on Route generates the code which matches the
parameters on the way out. From params->url that's one half of the
piece.
* write_recognition has the other half generates the conditions for
matching the routes on the way back in.
`
map.open_id_complete ‘session’, { :open_id_complete => true,
:requirements => { :method
=> :get },
:controller => "sessions",
:action => "create" }
I think instead of :requirements you should use :conditions
Lawrence
`
`
Hi,
I posted a message to rails talk about a problem with requirements option in routes, without answers:
Could anybody please give a hint about where does Rails process :requirements option in routes? I've been diving in ActionController code but it's big and I can't find the right point.
Thanks.
`
`
`