mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-07 23:03:58 -05:00
Remove deprecated Devise.activerecord51? method
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user