Seems map.resource does not allow the use of additional :conditions. Instead, it simply uses the :method condition. I have a need to add additional conditions to the automatically generated routes. Has anyone else come across this? Are there any solutions in the works or any that people have already found?
> I have a need to add additional conditions to the automatically > generated routes. Has anyone else come across this? Are there any > solutions in the works or any that people have already found?What''s the need that you have? -- Cheers Koz
On 8/5/06, Chris Abad <chris@integralimpressions.com> wrote:> Seems map.resource does not allow the use of additional :conditions. > Instead, it simply uses the :method condition. > > I have a need to add additional conditions to the automatically > generated routes. Has anyone else come across this? Are there any > solutions in the works or any that people have already found?What do you set in the :conditions besides the method? If you want multiple methods you can do: map.resources :foo, :member => { :blah => :any } -- Rick Olson http://techno-weenie.net
My app routes to specific controllers depending on the domain being used. The condition statements use :domain (thanks to the request_routing plugin). My specific situation is probably unique... but seems like others out there may need conditions for something. Is there a reason why map.resource only writes out the :method condition rather than adding :method to already supplied conditions? On Aug 5, 2006, at 6:27 PM, Michael Koziarski wrote:> I have a need to add additional conditions to the automatically > generated routes. Has anyone else come across this? Are there any > solutions in the works or any that people have already found?What''s the need that you have?