Class: Devise::JWT::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Devise::JWT::BaseController
- Includes:
- ActionController::MimeResponds
- Defined in:
- app/controllers/devise/jwt/base_controller.rb
Instance Method Summary collapse
- #respond_to_on_destroy ⇒ Object
- #respond_to_removed_action ⇒ Object
- #respond_with(resource, _opts = {}) ⇒ Object
Instance Method Details
#respond_to_on_destroy ⇒ Object
14 15 16 |
# File 'app/controllers/devise/jwt/base_controller.rb', line 14 def respond_to_on_destroy head :no_content end |
#respond_to_removed_action ⇒ Object
18 19 20 |
# File 'app/controllers/devise/jwt/base_controller.rb', line 18 def respond_to_removed_action head :not_found end |
#respond_with(resource, _opts = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/devise/jwt/base_controller.rb', line 6 def respond_with(resource, _opts = {}) if resource.valid? render json: resource, status: :created else render json: resource.errors, status: :unprocessable_entity end end |