You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 methodfind_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.cachedmethod.
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.
The text was updated successfully, but these errors were encountered:
Hi there. I ended up not using this gem as it was causing some weirdness in production for me and went with another solution. Sorry I can't be of more help!
@atuk84 I'm afraid I don't remember exactly what I did to fix the issue.
You may want to have a look at the ActionView::PathSet.find method in Rails and see how they're implementing the signature. As far as I can recall, that's how I eventually got around to fixing it.
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
This happens when
ActionView::PathSet.find
is called with 6 arguments (something that's apparently common in 3.1). The alias methodfind_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.
The text was updated successfully, but these errors were encountered: