Class: A::Users::PasswordsController
- Inherits:
-
BackendController
- Object
- BackendController
- A::Users::PasswordsController
- Defined in:
- lib/generators/mdwa/sandbox/templates/app/controllers/a/users/passwords_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
7 8 9 |
# File 'lib/generators/mdwa/sandbox/templates/app/controllers/a/users/passwords_controller.rb', line 7 def edit @user = current_user end |
#update ⇒ Object
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]) sign_in(@user, :bypass => true) redirect_to a_root_path, :notice => "Password updated." else render :edit end end |