Module: MongoMapperExt::Filter
- Defined in:
- lib/mongomapper_ext/filter.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mongomapper_ext/filter.rb', line 3 def self.included(klass) begin require 'lingua/stemmer' rescue LoadError $stderr.puts "install ruby-stemmer `gem install ruby-stemmer` to activate the full text search support" end klass.class_eval do extend ClassMethods key :_keywords, Set ensure_index :_keywords before_save :_update_keywords attr_accessor :search_score end end |