diff --git a/lib/acts_as_paranoid/core.rb b/lib/acts_as_paranoid/core.rb index f632f4eb..510062d1 100644 --- a/lib/acts_as_paranoid/core.rb +++ b/lib/acts_as_paranoid/core.rb @@ -3,11 +3,11 @@ module Core def self.included(base) base.extend ClassMethods if ActiveRecord::VERSION::MAJOR > 5 || (ActiveRecord::VERSION::MAJOR == 5 && (ActiveRecord::VERSION::MINOR >= 2 || (ActiveRecord::VERSION::MINOR == 2 && ActiveRecord::VERSION::TINY >= 1))) - base.alias_method :remember_transaction_record_state_without_paranoid, :remember_transaction_record_state - base.alias_method :remember_transaction_record_state, :remember_transaction_record_state_with_paranoid + base.send(:alias_method, :remember_transaction_record_state_without_paranoid, :remember_transaction_record_state) + base.send(:alias_method, :remember_transaction_record_state, :remember_transaction_record_state_with_paranoid) end - base.alias_method :force_clear_transaction_record_state_without_paranoid, :force_clear_transaction_record_state - base.alias_method :force_clear_transaction_record_state, :force_clear_transaction_record_state_with_paranoid + base.send(:alias_method, :force_clear_transaction_record_state_without_paranoid, :force_clear_transaction_record_state) + base.send(:alias_method, :force_clear_transaction_record_state, :force_clear_transaction_record_state_with_paranoid) end module ClassMethods