rails/rails — pull request #8084 by acapilleri (2012-10-31 13:33:13+00:00)
Title: if format is unknown NullMimeTypeObject is returned

If a unknown format is passed in a request, the methods html?, xml?, json? ...etc
Nil Exception.

This patch add a class NullMimeTypeObject, that is returned when request.format is unknown
and it responds false to the methods that ends with '?'.

It refers to #7837, not fixes because it's not considered a improvement not a bug.