Commit 974d24a36ab33b9e22e7fd53380c4fb6ce23ec82
1 parent
41eacc66
Exists in
relation
and in
1 other branch
Allow array [skip ci]
Showing
3 changed files
with
3 additions
and
2 deletions
Show diff stats
README.md
... | ... | @@ -415,7 +415,7 @@ exclude_queries = { |
415 | 415 | "cream" => ["ice cream", "whipped cream"] |
416 | 416 | } |
417 | 417 | |
418 | -Product.search(query).exclude(*exclude_queries[query]) | |
418 | +Product.search(query).exclude(exclude_queries[query]) | |
419 | 419 | ``` |
420 | 420 | |
421 | 421 | You can demote results by boosting by a factor less than one: | ... | ... |
lib/searchkick/relation.rb
test/match_test.rb
... | ... | @@ -176,6 +176,7 @@ class MatchTest < Minitest::Test |
176 | 176 | store_names ["Butter Tub", "Peanut Butter Tub"] |
177 | 177 | assert_search "butter", ["Butter Tub"], exclude: ["peanut butter"] |
178 | 178 | assert_search_relation ["Butter Tub"], Product.search("butter", relation: true).exclude("peanut butter") |
179 | + assert_search_relation ["Butter Tub"], Product.search("butter", relation: true).exclude(["peanut butter"]) | |
179 | 180 | end |
180 | 181 | |
181 | 182 | def test_exclude_butter_word_start | ... | ... |