Class: PasswordsController

Inherits:
Devise::PasswordsController
  • Object
show all
Defined in:
app/controllers/passwords_controller.rb

Instance Method Summary collapse

Instance Method Details

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

Yields:

  • (resource)

2
3
4
5
6
7
8
9
10
11
# File 'app/controllers/passwords_controller.rb', line 2

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

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