diff --git a/CHANGELOG.md b/CHANGELOG.md index d96ad3f1..5878f75e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### Unreleased - +* enhancements + * Removed deprecations warning output for `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` (@soartec-lab) ### 4.9.2 - 2023-04-03 diff --git a/lib/devise/models/authenticatable.rb b/lib/devise/models/authenticatable.rb index 30f2f463..e3466eba 100644 --- a/lib/devise/models/authenticatable.rb +++ b/lib/devise/models/authenticatable.rb @@ -61,9 +61,6 @@ module Devise :last_sign_in_ip, :password_salt, :confirmation_token, :confirmed_at, :confirmation_sent_at, :remember_token, :unconfirmed_email, :failed_attempts, :unlock_token, :locked_at] - include Devise::DeprecatedConstantAccessor - deprecate_constant "BLACKLIST_FOR_SERIALIZATION", "Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION", deprecator: Devise.deprecator - included do class_attribute :devise_modules, instance_writer: false self.devise_modules ||= [] diff --git a/test/models/serializable_test.rb b/test/models/serializable_test.rb index 3a032280..024ccf44 100644 --- a/test/models/serializable_test.rb +++ b/test/models/serializable_test.rb @@ -31,12 +31,6 @@ class SerializableTest < ActiveSupport::TestCase assert_key "username", @user.as_json({ only: :username, except: [:email].freeze }.freeze)["user"] end - test 'constant `BLACKLIST_FOR_SERIALIZATION` is deprecated' do - assert_deprecated("Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION", Devise.deprecator) do - Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION - end - end - def assert_key(key, subject) assert subject.key?(key), "Expected #{subject.inspect} to have key #{key.inspect}" end