module RediSearch::Model::ClassMethods

Attributes

redi_search_index[R]
redi_search_serializer[R]

Public Instance Methods

Private Instance Methods

register_redi_search_commit_hooks() click to toggle source

rubocop:enable Metrics/MethodLength

# File lib/redi_search/model.rb, line 34
def register_redi_search_commit_hooks
  after_commit(:redi_search_add_document, on: %i(create update)) if
    respond_to?(:after_commit)
  after_destroy_commit(:redi_search_delete_document) if
    respond_to?(:after_destroy_commit)
end