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 unlock keys. 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’s unlock keys
165 166 167 168 169 |
# File 'lib/devise/models/lockable.rb', line 165 def send_unlock_instructions(attributes={}) lockable = find_or_initialize_with_errors(unlock_keys, attributes, :not_found) lockable.resend_unlock_instructions if lockable.persisted? lockable end |