Sha256: 5759e5b6a76154272d901dd4b98118518283da1a5d96d420b05061a5324e8419

Contents?: true

Size: 519 Bytes

Versions: 15

Compression:

Stored size: 519 Bytes

Contents

module Searchlogic
  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

15 entries across 15 versions & 2 rubygems

Version Path
schof-searchlogic-0.0.2 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.7 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.4 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.9 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.1 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.0 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.8 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.10 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.3 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.5.6 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.4 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.5 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.6 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.2 lib/searchlogic/condition/not_end_with.rb
searchlogic-1.6.3 lib/searchlogic/condition/not_end_with.rb