-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
1.6.0 works, but master has NoMethodError: undefined method 'val' #504
Comments
Thank you @jaredbeck. Could you provide the query or test that is causing this issue (and the Ruby version just in case)? |
Sure, I don't know much about ransack, but I'll try. When I inspect the
I hope that helps. Let me know if you need more information. Thanks! The ruby version is
|
What is |
Do you have a failing spec I can use to reproduce this? |
To redact is to censor or obscure (part of a text) for legal or security concerns. But, you probably knew that :)
No, sorry, but I'm happy to give it a shot. I don't see a spec file for |
@jaredbeck I don't have enough information to reproduce your issue. You have shown me a basic search query, which works and all Ransack specs pass, so your issue is coming from something else. I don't know what your |
Woah. I just said I'm happy to do the legwork on a failing spec. I think it's a bit early to shut down on me, man. Please check out my questions about your test suite re: where the failing spec should go. |
|
OK, no worries, I'll keep working on something more reproducible. Thanks. |
Sure. I'm happy to have another look if we can reproduce the issue. |
It could be that the Do you want ransack to be responsible for raising a helpful error when a string is provided to an |
Alternatively, a helpful check like that could be the responsibility of Arel, but that's a low-level library and they might not want to be responsible for validating inputs (read: idiot-proofing) :) |
You may be right. A regression test to validate that hypothesis (and a helpful error message as a bonus) would be great 👍 |
This issue seems to have been introduced in 1.6.1 by 6c59e96
If I revert the following change to
adapters/active_record/ransack/nodes/condition.rb
from said commit, then my tests pass again.Of course, I'm not suggesting we revert the change, just trying to help isolate the issue.
Stack trace:
Relevant gems:
The text was updated successfully, but these errors were encountered: