Sha256: 73b5ef579fcbec63e4058d01f073f38d1b24f125e439ff2f73b83ce2c3a2f808

Contents?: true

Size: 290 Bytes

Versions: 11

Compression:

Stored size: 290 Bytes

Contents

module Searchgasm
  module Condition
    class Like < Base
      class << self
        def condition_names_for_column
          super + ["contains", "has"]
        end
      end
      
      def to_conditions(value)
        ["#{column_sql} LIKE ?", "%#{value}%"]
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
searchgasm-1.3.2 lib/searchgasm/condition/like.rb
searchgasm-1.3.4 lib/searchgasm/condition/like.rb
searchgasm-1.3.0 lib/searchgasm/condition/like.rb
searchgasm-1.3.3 lib/searchgasm/condition/like.rb
searchgasm-1.3.1 lib/searchgasm/condition/like.rb
searchgasm-1.3.5 lib/searchgasm/condition/like.rb
searchgasm-1.5.2 lib/searchgasm/condition/like.rb
searchgasm-1.4.1 lib/searchgasm/condition/like.rb
searchgasm-1.5.1 lib/searchgasm/condition/like.rb
searchgasm-1.5.0 lib/searchgasm/condition/like.rb
searchgasm-1.4.0 lib/searchgasm/condition/like.rb