Refactored according to line notes by rodrigoflores

This commit is contained in:
Nils Landt 2012-07-11 15:49:41 +02:00
parent 87f2fa9767
commit 42a0c30139
3 changed files with 3 additions and 3 deletions

View File

@ -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?

View File

@ -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

View File

@ -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)