Skip to content

Commit 1096b60

Browse files
Remove deprecated Devise.activerecord51? method
1 parent fc46631 commit 1096b60

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* 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)
99
* Remove deprecated `Devise::TestHelpers`, use `Devise::Test::ControllerHelpers` instead. [#5803](https://github.com/heartcombo/devise/pull/5803)
1010
* Remove deprecated `Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION` [#5598](https://github.com/heartcombo/devise/pull/5598)
11+
* Remove deprecated `Devise.activerecord51?` method.
1112
* 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.
1213

1314
This is potentially a breaking change because Devise previously used the following order to find a secret key:

lib/devise.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,6 @@ def self.secure_compare(a, b)
524524
def self.deprecator
525525
@deprecator ||= ActiveSupport::Deprecation.new("5.0", "Devise")
526526
end
527-
528-
def self.activerecord51? # :nodoc:
529-
deprecator.warn <<-DEPRECATION.strip_heredoc
530-
[Devise] `Devise.activerecord51?` is deprecated and will be removed in the next major version.
531-
It is a non-public method that's no longer used internally, but that other libraries have been relying on.
532-
DEPRECATION
533-
defined?(ActiveRecord) && ActiveRecord.gem_version >= Gem::Version.new("5.1.x")
534-
end
535527
end
536528

537529
require 'warden'

test/devise_test.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,4 @@ class DeviseTest < ActiveSupport::TestCase
111111
assert_no_match Devise.email_regexp, email
112112
end
113113
end
114-
115-
test 'Devise.activerecord51? deprecation' do
116-
assert_deprecated("`Devise.activerecord51?` is deprecated", Devise.deprecator) do
117-
Devise.activerecord51?
118-
end
119-
end
120114
end

0 commit comments

Comments
 (0)