cannikin/format_fallback — Issue #3: Support for Rails 3.1
Author: Simbul
Created: 2012-03-01 10:03:42+00:00
State: open

Hi there,
I'm trying to get format_fallback working on a Rails 3.1 project. I know it's only been tested on 3.0, so here is what I found.

First of all, I'm getting

wrong number of arguments (6 for 5) (ArgumentError)

This happens when `ActionView::PathSet.find` is called with 6 arguments (something that's apparently common in 3.1). The alias method `find_with_default_template` only supports 5, hence the error.
The solution that's worked for me here is to change the signature so that it accepts `*args`, as the overloaded method does.

The second issue is related to templates that cannot be found, even though they're there. I haven't looked deeply into this one, but found out that you can solve it by commenting out the overloaded `ActionView::Resolver.cached` method.

For the first issue, I can provide a patch. For the second issue, I thought it may be useful to know straight from you what's the purpose of the overloading, and what is going to be the consequence of removing it.