Sha256: c7f0ed432e75f175b12337b06e972937b74f187ffef97b658b73ce6a724a5f6a

Contents?: true

Size: 518 Bytes

Versions: 1

Compression:

Stored size: 518 Bytes

Contents

module Searchgasm
  module Condition
    class NotEndWith < Base
      class << self
        def condition_names_for_column
          super + ["not_ew", "not_end", "end_is_not", "end_not"]
        end
      end
      
      def to_conditions(value)
        ends_with = EndsWith.new(klass, options)
        ends_with.value = value
        conditions = ends_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_end_with.rb