Commit ee5eed54f974b7c7a88f84936e95b4acaac7cdfb

Authored by Andrew Kane
1 parent 4464c3e5

Removed relation option [skip ci]

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/searchkick.rb
@@ -88,7 +88,7 @@ module Searchkick @@ -88,7 +88,7 @@ module Searchkick
88 @server_below7 88 @server_below7
89 end 89 end
90 90
91 - def self.search(term = "*", model: nil, relation: nil, **options, &block) 91 + def self.search(term = "*", model: nil, **options, &block)
92 options = options.dup 92 options = options.dup
93 klass = model 93 klass = model
94 94
@@ -114,7 +114,7 @@ module Searchkick @@ -114,7 +114,7 @@ module Searchkick
114 end 114 end
115 115
116 options = options.merge(block: block) if block 116 options = options.merge(block: block) if block
117 - if relation || (relation.nil? && Searchkick.relation) 117 + if Searchkick.relation
118 Searchkick::Relation.new(klass, term, **options) 118 Searchkick::Relation.new(klass, term, **options)
119 else 119 else
120 query = Searchkick::Query.new(klass, term, **options) 120 query = Searchkick::Query.new(klass, term, **options)