Class: Remotty::Users::ConfirmationsController
- Inherits:
-
Devise::ConfirmationsController
- Object
- Devise::ConfirmationsController
- Remotty::Users::ConfirmationsController
- Includes:
- BaseController
- Defined in:
- app/controllers/remotty/users/confirmations_controller.rb
Instance Method Summary collapse
-
#show {|resource| ... } ⇒ Object
POST /resource/confirmation 토큰을 이용해 이메일 인증 확인 이미 사용한 토큰이거나 잘못된 경우는 에러 반환.
Instance Method Details
#show {|resource| ... } ⇒ Object
POST /resource/confirmation 토큰을 이용해 이메일 인증 확인 이미 사용한 토큰이거나 잘못된 경우는 에러 반환
return
-
success
- no_content -
failure
- unauthorized with error message
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/remotty/users/confirmations_controller.rb', line 12 def show self.resource = resource_class.confirm_by_token(params[:confirmation_token]) yield resource if block_given? if resource.errors.empty? render nothing: true, status: :no_content else render_error 'UNAUTHORIZED', resource.errors..first, :unauthorized end end |