Sha256: d8940c94f84d894f113f4339b478c51efa4367dcf36a16d08846e3bea2da6e01

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

module Searchgasm
  module Condition
    class NotIlike < Base
      class << self
        def condition_names_for_column
          super + ["not_icontain", "not_ihave"]
        end
      end
      
      def to_conditions(value)
        like = Ilike.new(klass, options)
        like.value = value
        conditions = like.to_conditions
        return conditions if conditions.blank?
        conditions.first.gsub!(" ILIKE ", " NOT ILIKE ")
        conditions
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
searchgasm-1.5.2 lib/searchgasm/condition/not_ilike.rb