Class: A::Users::PasswordsController

Inherits:
BackendController
  • Object
show all
Defined in:
lib/generators/mdwa/sandbox/templates/app/controllers/a/users/passwords_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



7
8
9
# File 'lib/generators/mdwa/sandbox/templates/app/controllers/a/users/passwords_controller.rb', line 7

def edit
  @user = current_user
end

#updateObject



11
12
13
14
15
16
17
18
19
# File 'lib/generators/mdwa/sandbox/templates/app/controllers/a/users/passwords_controller.rb', line 11

def update
  @user = current_user
  if @user.update_attributes(params[@user.class.name.underscore])
    (@user, :bypass => true)
    redirect_to a_root_path, :notice => "Password updated."
  else
    render :edit
  end
end