Module: AlgoliaSearch::InstanceMethods
- Defined in:
- lib/algoliasearch-rails.rb
Overview
these are the instance methods included
Class Method Summary collapse
Instance Method Summary collapse
- #algolia_enqueue_index!(synchronous) ⇒ Object
- #algolia_enqueue_remove_from_index!(synchronous) ⇒ Object
- #algolia_index!(synchronous = false) ⇒ Object
- #algolia_remove_from_index!(synchronous = false) ⇒ Object
Class Method Details
.included(base) ⇒ Object
984 985 986 987 988 989 |
# File 'lib/algoliasearch-rails.rb', line 984 def self.included(base) base.instance_eval do alias_method :index!, :algolia_index! unless method_defined? :index! alias_method :remove_from_index!, :algolia_remove_from_index! unless method_defined? :remove_from_index! end end |
Instance Method Details
#algolia_enqueue_index!(synchronous) ⇒ Object
1007 1008 1009 1010 1011 1012 1013 |
# File 'lib/algoliasearch-rails.rb', line 1007 def algolia_enqueue_index!(synchronous) if [:enqueue] [:enqueue].call(self, false) unless self.class.send(:algolia_indexing_disabled?, ) else algolia_index!(synchronous) end end |
#algolia_enqueue_remove_from_index!(synchronous) ⇒ Object
999 1000 1001 1002 1003 1004 1005 |
# File 'lib/algoliasearch-rails.rb', line 999 def algolia_enqueue_remove_from_index!(synchronous) if [:enqueue] [:enqueue].call(self, true) unless self.class.send(:algolia_indexing_disabled?, ) else algolia_remove_from_index!(synchronous || algolia_synchronous?) end end |
#algolia_index!(synchronous = false) ⇒ Object
991 992 993 |
# File 'lib/algoliasearch-rails.rb', line 991 def algolia_index!(synchronous = false) self.class.algolia_index!(self, synchronous || algolia_synchronous?) end |
#algolia_remove_from_index!(synchronous = false) ⇒ Object
995 996 997 |
# File 'lib/algoliasearch-rails.rb', line 995 def algolia_remove_from_index!(synchronous = false) self.class.algolia_remove_from_index!(self, synchronous || algolia_synchronous?) end |