Module: Mongoid::Fulltextable::ClassMethods
- Defined in:
- lib/mongoid/fulltextable.rb
Instance Method Summary collapse
-
#fulltextable(&block) ⇒ Object
Define proc which populates data for full-text index.
-
#fulltextable_fields(*args) ⇒ Object
Define fields which will be saved into full-text index.
Instance Method Details
#fulltextable(&block) ⇒ Object
Define proc which populates data for full-text index.
32 33 34 35 36 |
# File 'lib/mongoid/fulltextable.rb', line 32 def fulltextable(&block) before_save :update_keywords self.instance_variable_set(:@index_proc, block) end |
#fulltextable_fields(*args) ⇒ Object
Define fields which will be saved into full-text index.
25 26 27 28 29 |
# File 'lib/mongoid/fulltextable.rb', line 25 def fulltextable_fields(*args) before_save :update_keywords self.instance_variable_set(:@index_fields, args) end |