Sha256: fb2bdd764cf28758225fab4be338e3cd33a299be9169baa919b4a6a6455b45b9

Contents?: true

Size: 571 Bytes

Versions: 5

Compression:

Stored size: 571 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.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.5.1 lib/searchgasm/condition/not_begin_with.rb
searchgasm-1.5.0 lib/searchgasm/condition/not_begin_with.rb
searchgasm-1.4.0 lib/searchgasm/condition/not_begin_with.rb
searchgasm-1.5.2 lib/searchgasm/condition/not_begin_with.rb
searchgasm-1.4.1 lib/searchgasm/condition/not_begin_with.rb