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
Draper integration weirdness #319
Comments
|
Hey Steve! That's super weird that it's looking for a slug of 11; usually with friendly_id I would expect that to be a string e.g. 'robert-schmidt' I don't currently have an answer for this.. any chance of an example application from the OP? Should we post over at jcasimir/draper#260 to work this out? Cheers |
|
Either would be fine, if you think it's a bug in Draper and not in FriendlyId, then yeah, let's just chat over there. I bet that's the case. |
|
A very, very superficial look makes me suspect you're not overriding the method in the correct place. In a conceptually similar library I found it convenient to do this:
before defining the new method. ...although you could fairly say that I ended up having to do that because I didn't work hard enough to find the right place to override the method. Anyway, I'm more than happy to help resolve it on the FriendlyId side if need be, though right now I'm in a bit of a crunch with another project and won't be free for a few days. |
|
@reinh true to your word.. (and it could still be our bug!) |
|
It's just not the same without the memes and trolling. |
|
Or one of these: |
|
Did anybody ever get a fix for this? We started seeing this issue after upgrading from Rails 3.2.8 to 3.2.11 for the security fix (without any updates to draper or friendly id). |
|
@aramisbear the ticket in draper is here: drapergem/draper#260 |
|
@aramisbear please ensure you are using FriendlyId 4.0.9 after upgrading to Rails 3.2.11 |

Hi there!
I'm the current maintainer of draper, and @resgraph reported a bug recently: jcasimir/draper#260
It appears that since you do something special with finder methods, and we're proxying AR, that there's a conflict. I'm not super sure how FriendlyId works, since I don't use it personally, but Draper's codebase is much smaller. I think it has to do with the way that we delegate id, which is here: https://github.com/jcasimir/draper/blob/master/lib/draper/active_model_support.rb
Any thoughts would be appreciated. I'm sure we can figure something out.
The text was updated successfully, but these errors were encountered: