diff --git a/lib/devise.rb b/lib/devise.rb index dae7bda6..bce7e94c 100755 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -143,20 +143,8 @@ module Devise @@confirmation_keys = [:email] # Defines if email should be reconfirmable. - # False by default for backwards compatibility. - # TODO: 4.1 Do: @@reconfirmable = true - mattr_reader :reconfirmable - @@reconfirmable = false - - def self.reconfirmable=(reconfirmable) - app_set_configs << :reconfirmable - @@reconfirmable = reconfirmable - end - - def reconfirmable=(reconfirmable) - app_set_configs << :reconfirmable - @@reconfirmable = reconfirmable - end + mattr_accessor :reconfirmable + @@reconfirmable = true # Time interval to timeout the user session without activity. mattr_accessor :timeout_in @@ -319,7 +307,6 @@ module Devise def self.setup yield self - warn_default_config_changed(:reconfirmable, 'false', 'true') warn_default_config_changed(:sign_out_via, ':get', ':delete') warn_default_config_changed(:skip_session_storage, '[]', '[:http_auth]') end diff --git a/test/devise_test.rb b/test/devise_test.rb index fe75a45a..4c0b1efe 100755 --- a/test/devise_test.rb +++ b/test/devise_test.rb @@ -38,7 +38,6 @@ class DeviseTest < ActiveSupport::TestCase test 'setup block warns about defaults changing' do Devise.app_set_configs = Set.new - ActiveSupport::Deprecation.expects(:warn).with() { |value| value =~ /reconfirmable/ } ActiveSupport::Deprecation.expects(:warn).with() { |value| value =~ /sign_out_via/ } ActiveSupport::Deprecation.expects(:warn).with() { |value| value =~ /skip_session_storage/ } @@ -50,7 +49,6 @@ class DeviseTest < ActiveSupport::TestCase ActiveSupport::Deprecation.expects(:warn).never swap Devise, - reconfirmable: false, sign_out_via: :get, skip_session_storage: [] do Devise.setup do diff --git a/test/rails_app/lib/shared_user.rb b/test/rails_app/lib/shared_user.rb index 9d7cac21..c3b023a4 100644 --- a/test/rails_app/lib/shared_user.rb +++ b/test/rails_app/lib/shared_user.rb @@ -4,7 +4,8 @@ module SharedUser included do devise :database_authenticatable, :confirmable, :lockable, :recoverable, :registerable, :rememberable, :timeoutable, - :trackable, :validatable, :omniauthable, password_length: 7..72 + :trackable, :validatable, :omniauthable, password_length: 7..72, + reconfirmable: false attr_accessor :other_key diff --git a/test/rails_app/lib/shared_user_without_omniauth.rb b/test/rails_app/lib/shared_user_without_omniauth.rb index df145e35..7f0396c0 100644 --- a/test/rails_app/lib/shared_user_without_omniauth.rb +++ b/test/rails_app/lib/shared_user_without_omniauth.rb @@ -4,7 +4,7 @@ module SharedUserWithoutOmniauth included do devise :database_authenticatable, :confirmable, :lockable, :recoverable, :registerable, :rememberable, :timeoutable, - :trackable, :validatable + :trackable, :validatable, reconfirmable: false end def raw_confirmation_token