Method: Devise::PasswordsController#create

Defined in:
app/controllers/devise/passwords_controller.rb

#create {|resource| ... } ⇒ Object

POST /resource/password

Yields:

[View source] [View on GitHub]

14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/devise/passwords_controller.rb', line 14

def create
  self.resource = resource_class.send_reset_password_instructions(resource_params)
  yield resource if block_given?

  if successfully_sent?(resource)
    respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name))
  else
    respond_with(resource)
  end
end