Forum: Ruby on Rails respond_to for unknown type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A9c9ca4545d873f5525da43d361487ef?d=identicon&s=25 Kristoph (Guest)
on 2007-07-08 00:36
(Received via mailing list)
Greetings,

How would I go about handling an unknown type in a respond_to block?

That is, I currently have  ...

respond_to do | format |
  format.html { do something }
  format.xml { do something else }
end

I would like a handler for all other format's, other than html/xml, so
that I can, for example, log the request, render an error or whatnot.

Thank you,

]{
This topic is locked and can not be replied to.