Sha256: 9814fc32b0480ba0035b8190c116baa92bd4c4aa52c935bdd714c46c1d499271

Contents?: true

Size: 608 Bytes

Versions: 15

Compression:

Stored size: 608 Bytes

Contents

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

15 entries across 15 versions & 2 rubygems

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