Sha256: 387c29a6040151e2c0738457e410df375894aa4743bf54a2b8e2d781af59743c

Contents?: true

Size: 523 Bytes

Versions: 5

Compression:

Stored size: 523 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.to_conditions
        return conditions if conditions.blank?
        conditions.first.gsub!(" LIKE ", " NOT LIKE ")
        conditions
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
searchgasm-1.4.0 lib/searchgasm/condition/not_end_with.rb
searchgasm-1.4.1 lib/searchgasm/condition/not_end_with.rb
searchgasm-1.5.0 lib/searchgasm/condition/not_end_with.rb
searchgasm-1.5.1 lib/searchgasm/condition/not_end_with.rb
searchgasm-1.5.2 lib/searchgasm/condition/not_end_with.rb