Skip to content

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

Open
threewordphrase wants to merge 1 commit intospree-contrib:3-0-stablefrom
threewordphrase:bug/racksack-param-translations-mangled
Open

Ransack control params (:m, :s) mangled by translator into :m_, :s_#659
threewordphrase wants to merge 1 commit intospree-contrib:3-0-stablefrom
threewordphrase:bug/racksack-param-translations-mangled

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