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. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> 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. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> 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: > 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. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---