mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Refactored according to line notes by rodrigoflores
This commit is contained in:
parent
87f2fa9767
commit
42a0c30139
3 changed files with 3 additions and 3 deletions
|
@ -178,7 +178,7 @@ module Devise
|
|||
|
||||
# Checks whether the record requires any confirmation.
|
||||
def pending_any_confirmation
|
||||
if !confirmation_period_expired? && (!confirmed? || pending_reconfirmation?)
|
||||
unless confirmation_period_expired? || (confirmed? && !pending_reconfirmation?)
|
||||
yield
|
||||
else
|
||||
# TODO: cache this call or not?
|
||||
|
|
|
@ -97,7 +97,7 @@ Devise.setup do |config|
|
|||
# within 3 days after the mail was sent, but on the fourth day their account can't be
|
||||
# confirmed with the token any more
|
||||
# Default is nil, meaning there is no restriction on how long a user can take before
|
||||
# comfirming their account.
|
||||
# confirming their account.
|
||||
# config.expire_confirmation_token_after = 3.days
|
||||
|
||||
# If true, requires any email changes to be confirmed (exactly the same way as
|
||||
|
|
|
@ -236,7 +236,7 @@ class ConfirmableTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def confirm_user_by_token_with_confirmation_sent_at confirmation_sent_at
|
||||
def confirm_user_by_token_with_confirmation_sent_at(confirmation_sent_at)
|
||||
user = create_user
|
||||
user.confirmation_sent_at = confirmation_sent_at
|
||||
confirmed_user = User.confirm_by_token(user.confirmation_token)
|
||||
|
|
Loading…
Add table
Reference in a new issue