Class: Gluttonberg::Admin::PasswordResetsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- BaseController
- Gluttonberg::Admin::PasswordResetsController
- Defined in:
- app/controllers/gluttonberg/admin/password_resets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/gluttonberg/admin/password_resets_controller.rb', line 12 def create @user = User.where(:email => params[:user][:email]).first if @user @user.deliver_password_reset_instructions! flash[:notice] = "Instructions to reset your password have been emailed to you. " + "Please check your email." redirect_to admin_login_path else flash[:error] = "No user was found with that email address" redirect_to new_admin_password_reset_path end end |
#edit ⇒ Object
25 26 27 |
# File 'app/controllers/gluttonberg/admin/password_resets_controller.rb', line 25 def edit end |
#new ⇒ Object
9 10 |
# File 'app/controllers/gluttonberg/admin/password_resets_controller.rb', line 9 def new end |
#update ⇒ Object
29 30 31 32 33 |
# File 'app/controllers/gluttonberg/admin/password_resets_controller.rb', line 29 def update @user.password = params[:user][:password] @user.password_confirmation = params[:user][:password_confirmation] generic_update_reset_password(@user, admin_login_path) end |