-
-
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
Ransack doesn't handle attribute names including "and" / "or" #299
Comments
What would break if we made ransack split on |
@seanlinsley Keep in mind you can build your query from hashes, this is what ransack does when parsing it internally:
|
I'm not actually running into this problem myself because I don't have any attributes with "and" / "or" in the name. I only attempted a fix to force myself to better understand how Ransack works. Is it possible to build a ransacker with the hash syntax? |
Well, you could set up a ransacker to cover the right column name; not sure how you'd want to actually use it with the hash syntax though:
|
This was resolved by #449 |
Apparently not: #302 (comment) |
Starting from: activeadmin/activeadmin#2669
If you have a
foo_and_bar
attribute on a model, this should work:My best guess is that right now the logic that allows this:
Is skipping past existing attributes, and likely also skipping past existing ransackers.
The text was updated successfully, but these errors were encountered: