lib/picky/query/indexes_check.rb in picky-4.4.1 vs lib/picky/query/indexes_check.rb in picky-4.4.2

- old
+ new

@@ -12,27 +12,27 @@ # Currently it isn't possible using Memory and Redis etc. # indexes in the same query index group. # # Picky will raise a Query::Indexes::DifferentBackendsError. # - def check_backends indexes # :nodoc: + def check_backends indexes backends = indexes.map &:backend backends.uniq! &:class raise_different backends if backends.size > 1 backends end - def raise_different backends # :nodoc: + def raise_different backends raise DifferentBackendsError.new(backends) end end end # Currently it isn't possible using Memory and Redis etc. # indexes in the same query index group. # - class DifferentBackendsError < StandardError # :nodoc:all + class DifferentBackendsError < StandardError def initialize backends @backends = backends end def to_s "Currently it isn't possible to mix Indexes with backends #{@backends.join(" and ")} in the same Search instance." \ No newline at end of file