Method: Devise::Models::Lockable::ClassMethods#send_unlock_instructions
- Defined in:
- lib/devise/models/lockable.rb
#send_unlock_instructions(attributes = {}) ⇒ Object
Attempt to find a user by its email. If a record is found, send new unlock instructions to it. If not user is found, returns a new user with an email not found error. Options must contain the user email
159 160 161 162 163 |
# File 'lib/devise/models/lockable.rb', line 159 def send_unlock_instructions(attributes={}) lockable = find_or_initialize_with_errors(unlock_keys, attributes, :not_found) lockable.resend_unlock_token if lockable.persisted? lockable end |