Skip to content

Commit

Permalink
Refactored according to line notes by rodrigoflores
Browse files Browse the repository at this point in the history
  • Loading branch information
promisedlandt committed Jul 11, 2012
1 parent 87f2fa9 commit 42a0c30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/devise/models/confirmable.rb
Expand Up @@ -178,7 +178,7 @@ def confirmation_period_expired?

# 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?
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/templates/devise.rb
Expand Up @@ -97,7 +97,7 @@
# 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
Expand Down
2 changes: 1 addition & 1 deletion test/models/confirmable_test.rb
Expand Up @@ -236,7 +236,7 @@ def setup
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)
Expand Down

0 comments on commit 42a0c30

Please sign in to comment.