Class: Spree::Admin::UserPasswordsController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/spree/admin/user_passwords_controller.rb

Instance Method Summary collapse

Instance Method Details

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

Yields:

  • (resource)


6
7
8
9
10
11
12
13
# File 'app/controllers/spree/admin/user_passwords_controller.rb', line 6

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

  set_flash_message(:notice, :send_instructions) if is_navigational_format?
  # Don't not show error message that the email was not found
  respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name))
end