Class: Pbw::PasswordsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
# File 'app/controllers/pbw/passwords_controller.rb', line 5

def create
  self.resource = resource_class.where(params).first
  if resource && resource.reset_password!
    head :no_content
  else
    render status: :unprocessable_entity
  end
end