diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1de46c..f53f7c18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Remove deprecated `scope` second argument from `sign_in(resource, :admin)` controller test helper, use `sign_in(resource, scope: :admin)` instead. [#5803](https://github.com/heartcombo/devise/pull/5803) * Remove deprecated `Devise::TestHelpers`, use `Devise::Test::ControllerHelpers` instead. [#5803](https://github.com/heartcombo/devise/pull/5803) * Remove deprecated `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` [#5598](https://github.com/heartcombo/devise/pull/5598) + * Remove deprecated `Devise.activerecord51?` method. * Remove `SecretKeyFinder` and use `app.secret_key_base` as the default secret key for `Devise.secret_key` if a custom `Devise.secret_key` is not provided. This is potentially a breaking change because Devise previously used the following order to find a secret key: diff --git a/lib/devise.rb b/lib/devise.rb index c4213192..8e0c85e7 100644 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -524,14 +524,6 @@ module Devise def self.deprecator @deprecator ||= ActiveSupport::Deprecation.new("5.0", "Devise") end - - def self.activerecord51? # :nodoc: - deprecator.warn <<-DEPRECATION.strip_heredoc - [Devise] `Devise.activerecord51?` is deprecated and will be removed in the next major version. - It is a non-public method that's no longer used internally, but that other libraries have been relying on. - DEPRECATION - defined?(ActiveRecord) && ActiveRecord.gem_version >= Gem::Version.new("5.1.x") - end end require 'warden' diff --git a/test/devise_test.rb b/test/devise_test.rb index 2f98bb4f..a46be0d5 100644 --- a/test/devise_test.rb +++ b/test/devise_test.rb @@ -111,10 +111,4 @@ class DeviseTest < ActiveSupport::TestCase assert_no_match Devise.email_regexp, email end end - - test 'Devise.activerecord51? deprecation' do - assert_deprecated("`Devise.activerecord51?` is deprecated", Devise.deprecator) do - Devise.activerecord51? - end - end end