You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Rails 7 they've added specific ActiveSupport::Deprecator instances to be used instead of a generic .warn method, and by Rails 7.2 the ActiveSupport::Deprecation.warn method has been undefined so we get a NoMethodError when passing a record rather than the code working and a deprecation warning being emitted.
We should update the behaviour in paranoia to work out if we're on a new enough rails (probably check for presence of ActiveSupport::Deprecation.method(:warn)?) to use the Deprecator instances and create one for the Paranoia gem rather than using the generic .warn across the app in the earlier Railses.
The text was updated successfully, but these errors were encountered:
If you invoke
Model.restore(instance)
then paranoia finds the id from the instances for you and issues a deprecation warning at https://github.com/rubysherpas/paranoia/blob/core/lib/paranoia.rb#L50-L54In Rails 7 they've added specific ActiveSupport::Deprecator instances to be used instead of a generic
.warn
method, and by Rails 7.2 theActiveSupport::Deprecation.warn
method has been undefined so we get aNoMethodError
when passing a record rather than the code working and a deprecation warning being emitted.We should update the behaviour in paranoia to work out if we're on a new enough rails (probably check for presence of
ActiveSupport::Deprecation.method(:warn)
?) to use the Deprecator instances and create one for the Paranoia gem rather than using the generic.warn
across the app in the earlier Railses.The text was updated successfully, but these errors were encountered: