Skip to content

Commit

Permalink
Prevent model callbacks if deactivated
Browse files Browse the repository at this point in the history
  • Loading branch information
pozelli authored and Pedro Pozelli committed Mar 9, 2025
1 parent 8571262 commit d546a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/meilisearch-rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def meilisearch(options = {}, &block)
proc.call(record, remove) if ::MeiliSearch::Rails.active? && !ms_without_auto_index_scope
end
end
unless options[:auto_index] == false
if ::MeiliSearch::Rails.active? && options[:auto_index] != false
if defined?(::Sequel::Model) && self < Sequel::Model
class_eval do
copy_after_validation = instance_method(:after_validation)
Expand Down

0 comments on commit d546a03

Please sign in to comment.