Class: Rails::Auth::UnlocksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Rails::Auth::UnlocksController
- Defined in:
- app/controllers/rails/auth/unlocks_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/rails/auth/unlocks_controller.rb', line 6 def show user = Rails::Auth.user_class.find_by(unlock_token: params[:unlock_token]) if user user.unlock_access! redirect_to new_session_path, notice: "Your account has been unlocked. Please sign in." else redirect_to new_session_path, alert: "Invalid unlock token." end end |