Sha256: 1192502cfe85b0fb809b21d650140d05b92daa55a4b63eec7706903736006282

Contents?: true

Size: 362 Bytes

Versions: 5

Compression:

Stored size: 362 Bytes

Contents

module Sunspot
  module Query
    class Scope < Connective::Conjunction
      def to_params
        filters = []
        @components.each do |component|
          filter = component.to_filter_query
          filters << filter unless filter.nil?
        end
        if filters.empty? then {}
        else { :fq => filters}
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruben-sunspot-1.1.4 lib/sunspot/query/scope.rb
ruben-sunspot-1.1.3 lib/sunspot/query/scope.rb
ruben-sunspot-1.1.2 lib/sunspot/query/scope.rb
ruben-sunspot-1.1.1 lib/sunspot/query/scope.rb
ruben-sunspot-1.1.0 lib/sunspot/query/scope.rb