devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Devise::Models::Confirmable#confirmation_period_expired?

Checks if the user confirmation happens before the token becomes invalid
Examples:

  # confirm_within = 3.days and confirmation_sent_at = 2.days.ago
  confirmation_period_expired?  # returns false

  # confirm_within = 3.days and confirmation_sent_at = 4.days.ago
  confirmation_period_expired?  # returns true

  # confirm_within = nil
  confirmation_period_expired?  # will always return false

Source | Google | Stack overflow

Edit

git clone [email protected]:plataformatec/devise.git

cd devise

open lib/devise/models/confirmable.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Devise--Models--Confirmable-confirmation_period_expired--for-pr


# Commit to git

git add lib/devise/models/confirmable.rbgit commit -m "better docs for Devise::Models::Confirmable#confirmation_period_expired?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Devise--Models--Confirmable-confirmation_period_expired--for-pr

hub pull-request


# Celebrate!