Class: RailsJwtAuth::UnlockAccountsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- RailsJwtAuth::UnlockAccountsController
- Includes:
- ParamsHelper, RenderHelper
- Defined in:
- app/controllers/rails_jwt_auth/unlock_accounts_controller.rb
Instance Method Summary collapse
Methods included from RenderHelper
#render_204, #render_404, #render_410, #render_422, #render_profile, #render_registration, #render_session
Instance Method Details
#update ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/rails_jwt_auth/unlock_accounts_controller.rb', line 6 def update return render_404 unless params[:id] && (user = RailsJwtAuth.model.where(unlock_token: params[:id]).first) user.unlock_access ? render_204 : render_422(user.errors.details) end |