Apr 13
Beware respond_to format with redirects in shared systems before_filter - DoubleRenderError
If you have global before_filters for things like requiring login to access pages (such as in authenticated_system.rb), be careful of missing formats in the respond_to. I just tracked down a bug on an app where we were getting DoubleRenderErrors because of unauthenticated requests directly against a dynamic csv file.
We had a before_filter that was denying request and redirecting them to login, in different ways, depending on the format, but hadn't thought to include csv. In this case, it is wise to include a catch-all at the end using .any

