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

Ransack control params (:m, :s) mangled by translator into :m_, :s_ #659

Open
wants to merge 1 commit into
base: 3-0-stable
Choose a base branch
from

Conversation

threewordphrase
Copy link

Prevents changing the default grouping of the AND ransack query to OR.

Change uses check blank? instead of == '' for non-values in SpreeI18n::RansackTranslator#join_key. Racksack::Predicate returns nil, really any non-value should be handled without mangling arbitrary params used to control ransack. Also took the liberty of removing the skip of the 's' param in key_with_translations, since I am assuming this was inserted for a similar reason. This fix should be more applicable to future control params as well.

…nslator#join_key. Racksack::Predicate returns nil, really any non-value should be handled without mangling arbitrary params used to control ransack. Also took the liberty of removing the skip of the 's' param in key_with_translations, since I am assuming this was inserted for a similar reason. This fix should be more applicable to future control params as well.
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

Successfully merging this pull request may close these issues.

1 participant