michael-+08J6pdAJjhWk0Htik3J/w@public.gmane.org
2008-Jun-13 16:02 UTC
Adding custom conditions to map.resources
I''m doing some route hacking and have run into something I haven''t been able to get past. I need to add a custom condition on to RESTful resources in the same way that you can add custom conditions to other routes. I have already hacked on my solution for most routes by chaining to recognition_conditions, but the conditions seem to be ignored by RESTful routes. The desired behavior would be to pass a :conditions => {:subdomain => true/false} and have that run a logic check to see whether the subdomain of the current host matches against a list of allowed subdomains. I have the logic, it works fine for most routes, but I can''t see how to add conditions to the RESTful routes since they aren''t picked up by the rest. Any help would be appreciated. Thanks, Michael Bleigh --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---