| Module | Foo::Acts::Indexed::InstanceMethods |
| In: |
lib/acts_as_indexed.rb
|
Adds model class instance methods. Methods are called automatically by ActiveRecord on save, destroy, and update of model instances.
Adds the current model instance to index. Called by ActiveRecord on save.
# File lib/acts_as_indexed.rb, line 197
197: def add_to_index
198: self.class.index_add(self)
199: end
Removes the current model instance to index. Called by ActiveRecord on destroy.
# File lib/acts_as_indexed.rb, line 203
203: def remove_from_index
204: self.class.index_remove(self)
205: end