Sha256: 7a594059374d551ca34e55c54d6337c72f665f984b0366d8fb5d9e949c64e42d

Contents?: true

Size: 613 Bytes

Versions: 8

Compression:

Stored size: 613 Bytes

Contents

module Searchlogic
  module Condition
    class Equals < Base
      self.handle_array_value = true
      self.ignore_meaningless_value = false
      
      class << self
        def condition_names_for_column
          super + ["", "is"]
        end
      end
      
      def to_conditions(value)
        # Let ActiveRecord handle this
        args = []
        case value
        when Range
          args = [value.first, value.last]
        else
          args << value
        end
                        
        ["#{column_sql} #{klass.send(:attribute_condition, value)}", *args]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
searchlogic-1.5.9 lib/searchlogic/condition/equals.rb
searchlogic-1.5.10 lib/searchlogic/condition/equals.rb
searchlogic-1.5.6 lib/searchlogic/condition/equals.rb
searchlogic-1.5.8 lib/searchlogic/condition/equals.rb
searchlogic-1.6.0 lib/searchlogic/condition/equals.rb
searchlogic-1.5.4 lib/searchlogic/condition/equals.rb
searchlogic-1.5.7 lib/searchlogic/condition/equals.rb
searchlogic-1.5.3 lib/searchlogic/condition/equals.rb