Sha256: 816a1a5e7275fc35ddd744bc1bdd6d0c080b43782d848b18263ce75b44443cf2

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

module Searchgasm
  module Condition
    class NotBeginWith < Base
      class << self
        def condition_names_for_column
          super + ["not_bw", "not_sw", "not_start_with", "not_start", "beginning_is_not", "beginning_not"]
        end
      end
      
      def to_conditions(value)
        begin_with = BeginWith.new(klass, options)
        begin_with.value = value
        conditions = being_with.sanitize
        return conditions if conditions.blank?
        conditions.first.gsub!(" LIKE ", " NOT LIKE ")
        conditions
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
searchgasm-1.5.3 lib/searchgasm/condition/not_begin_with.rb