Hi,

We've had some requests though for nonsense URLs which have slipped
through to our controllers and caused ActionView::MissingTemplate
exceptions. They're from URLs like

    /artists/123-radiohead.php

I feel like it should be possible to block this request at the routing
stage - before it reaches the artists controller, but I can't see how
it could be done. We use restful routes, so the artists controller is
wired up using

    map.resources :artists

Is there any way to add an option to this call to specify the formats
that are acceptable (and thus return a 40x code if the format is not
in the whitelist?)

e.g.

    map.resources :artists, :format => [ :html, :json ]

I can't see anything in the docs, or indeed the code, which would let
me do this, but I might well have missed something.

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

Reply via email to