Files

Class/Module Index [+]

Quicksearch

Devise::Models::Confirmable::ClassMethods

Public Instance Methods

confirm_by_token(confirmation_token) click to toggle source

Find a user by its confirmation token and try to confirm it. If no user is found, returns a new user with an error. If the user is already confirmed, create an error for the user Options must have the confirmation_token

# File lib/devise/models/confirmable.rb, line 150
def confirm_by_token(confirmation_token)
  confirmable = find_or_initialize_with_error_by(:confirmation_token, confirmation_token)
  confirmable.confirm! if confirmable.persisted?
  confirmable
end
confirmation_token() click to toggle source

Generate a token checking if one does not already exist in the database.

# File lib/devise/models/confirmable.rb, line 157
def confirmation_token
  generate_token(:confirmation_token)
end
send_confirmation_instructions(attributes={}) click to toggle source

Attempt to find a user by its email. If a record is found, send new confirmation instructions to it. If not user is found, returns a new user with an email not found error. Options must contain the user email

# File lib/devise/models/confirmable.rb, line 140
def send_confirmation_instructions(attributes={})
  confirmable = find_or_initialize_with_errors(confirmation_keys, attributes, :not_found)
  confirmable.resend_confirmation_token if confirmable.persisted?
  confirmable
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.