Sha256: b7290b3d070d3898c707b3d5cb7ab51001901ee477d5288a1ccc9cb5c8ddb51d
Contents?: true
Size: 607 Bytes
Versions: 1
Compression:
Stored size: 607 Bytes
Contents
module Searchgasm module Condition class NotHaveKeywords < Base class << self def condition_names_for_column super + ["not_have_keywords", "not_keywords", "not_have_kw", "not_kw", "not_have_kwwords", "not_kwwords"] end end def to_conditions(value) keywords = Keywords.new(klass, options) keywords.value = value conditions = keywords.sanitize return conditions if conditions.blank? conditions.first.gsub!(" #{like_condition_name} ", " NOT #{like_condition_name} ") conditions end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
searchgasm-1.5.3 | lib/searchgasm/condition/not_have_keywords.rb |