class Policy
include Mongoid::Document
include Mongoid::Timestamps
include MeiliSearch::Rails
# extend Pagy::Meilisearch
meilisearch do
searchable_attributes [:title, :content_text]
end
When I use Policy.reindex!, it shows:
/opt/homebrew/lib/ruby/gems/3.3.0/gems/meilisearch-rails-0.13.0/lib/meilisearch-rails.rb:464:in `meilisearch': undefined method `after_destroy_commit' for class Policy (NoMethodError)
after_destroy_commit { |searchable| searchable.ms_enqueue_remove_from_index!(ms_synchronous?) }
^^^^^^^^^^^^^^^^^^^^
Did you mean? after_destroy
Expected behavior
What you expected to happen.
Current behavior
What happened.
Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.
Description I have a model like this:
When I use
Policy.reindex!
, it shows:Expected behavior What you expected to happen.
Current behavior What happened.
Screenshots or Logs If applicable, add screenshots or logs to help explain your problem.
Environment :