Forum: Ruby on Rails respond_to for unknown type

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kristoph (Guest)
on 2007-07-08 02:36
(Received via mailing list)

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 }

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.