Class: Unsakini::UserTokenController
- Inherits:
-
Knock::AuthTokenController
- Object
- Knock::AuthTokenController
- Unsakini::UserTokenController
- Defined in:
- app/controllers/unsakini/user_token_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/unsakini/user_token_controller.rb', line 3 def create if entity.confirmed_at? render json: auth_token, status: :created else res = {message: "Your account needs confirmation. Please follow the confirmation instructions sent to #{auth_params[:email]}"} render status: 401, json: res end end |
#entity_name ⇒ Object
12 13 14 |
# File 'app/controllers/unsakini/user_token_controller.rb', line 12 def entity_name self.class.name.split('TokenController').first end |