cannikin/format_fallback — pull request #2 by Simbul (2011-12-01 17:13:34+00:00)
Title: Do not fallback for layouts

Layouts have their own way of managing a `MissingTemplate` exception.
In particular, the find_layout() method inside ActionView::Layouts will fallback to not using a layout when none is found for the specified format (roughly equivalent to calling `render :layout => false` in the controller action).

This is useful in the case of remote AJaX calls, when the format is `js`, and no layout should be rendered, even if the `:layout => false` option is not explicitly specified.

The check I'm using to detect a layout is probably a bit naive, please feel free to improve on it. As a quick fix, though, it seems to be working fine.