Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Rails 3.1 #3

Open
Simbul opened this issue Mar 1, 2012 · 3 comments
Open

Support for Rails 3.1 #3

Simbul opened this issue Mar 1, 2012 · 3 comments

Comments

@Simbul
Copy link

Simbul commented Mar 1, 2012

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.

@cannikin
Copy link
Owner

cannikin commented Mar 8, 2012

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!

@SentulAsia
Copy link

hi @Simbul i'm having trouble with the same error as well... i wonder dow do i use *args to fix this issue...

@Simbul
Copy link
Author

Simbul commented Jul 17, 2012

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants