Sha256: befcd537ce519dbf084d900183dd09163286fec6372940fcfa32838122430900

Contents?: true

Size: 312 Bytes

Versions: 8

Compression:

Stored size: 312 Bytes

Contents

module Searchgasm
  module Condition
    class BeginsWith < Base
      class << self
        def condition_names_for_column
          super + ["bw", "sw", "starts_with", "start"]
        end
      end
      
      def to_conditions(value)
        ["#{column_sql} LIKE ?", "#{value}%"]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
searchgasm-1.3.3 lib/searchgasm/condition/begins_with.rb
searchgasm-1.3.0 lib/searchgasm/condition/begins_with.rb
searchgasm-1.3.1 lib/searchgasm/condition/begins_with.rb
searchgasm-1.3.2 lib/searchgasm/condition/begins_with.rb
searchgasm-1.3.4 lib/searchgasm/condition/begins_with.rb
searchgasm-1.3.5 lib/searchgasm/condition/begins_with.rb
searchgasm-1.4.0 lib/searchgasm/condition/begins_with.rb
searchgasm-1.4.1 lib/searchgasm/condition/begins_with.rb