Skip to content
Browse files

Fix argument error when passing refresh to reindex (#1367)

`reindex_scope` function that is called in the else block of
`reindex` raises an argument error exception when `refresh` option
is passed on. This commit makes sure it is removed from the options.
  • Loading branch information
milani committed Feb 5, 2020
1 parent 18477e2 commit ec269be04a18ff28c85cd98dfa5d10cb3da5cb53
Showing with 5 additions and 0 deletions.
  1. +1 −0 lib/searchkick/index.rb
  2. +4 −0 test/reindex_test.rb
@@ -184,6 +184,7 @@ def reindex_queue

def reindex(relation, method_name, scoped:, full: false, scope: nil, **options)
refresh = options.fetch(:refresh, !scoped)

if method_name
# update
@@ -88,4 +88,8 @@ def test_refresh_interval
def test_resume
assert Product.reindex(resume: true)

def test_full_reindex
Product.reindex(refresh: true)

0 comments on commit ec269be

Please sign in to comment.
You can’t perform that action at this time.