Class: Users::PasswordsController

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

Instance Method Summary collapse

Instance Method Details

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

POST /resource/password

Yields:

  • (resource)


19
20
21
22
23
24
25
26
# File 'app/controllers/users/passwords_controller.rb', line 19

def create
  authorize :"users/passwords"
  self.resource = resource_class.send_reset_password_instructions(resource_params)
  yield resource if block_given?
  # This operation should always look like it succeeded
  set_flash_message! :notice, :send_instructions
  respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name))
end

#edit ⇒ Object

GET /resource/password/edit?reset_password_token=abcdef



13
14
15
16
# File 'app/controllers/users/passwords_controller.rb', line 13

def edit
  authorize :"users/passwords"
  super
end

#new ⇒ Object

GET /resource/password/new



7
8
9
10
# File 'app/controllers/users/passwords_controller.rb', line 7

def new
  authorize :"users/passwords"
  super
end

#update ⇒ Object

PUT /resource/password



29
30
31
32
# File 'app/controllers/users/passwords_controller.rb', line 29

def update
  authorize :"users/passwords"
  super
end