Class: Nyauth::ResetPasswordsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/nyauth/reset_passwords_controller.rb

Instance Method Summary collapse

Methods included from ClientConcern

#initialize

Methods included from ApplicationHelper

#detect_url_helper, #detect_url_helper_for_app, #detect_url_helper_for_nyauth, #method_missing, #root_path

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Nyauth::ApplicationHelper

Instance Method Details

#editObject



6
7
8
9
10
# File 'app/controllers/nyauth/reset_passwords_controller.rb', line 6

def edit
  unless @client.valid?(:edit_reset_password)
    redirect_to new_session_path_for(nyauth_client_name), alert: @client.errors[:reset_password_key].last
  end
end

#updateObject



12
13
14
15
# File 'app/controllers/nyauth/reset_passwords_controller.rb', line 12

def update
  @client.reset_password(client_params)
  respond_with(@client, location: Nyauth.configuration.redirect_path_after_reset_password.call(nyauth_client_name) || new_session_path_for(nyauth_client_name))
end