Module: Api::Error

Extended by:
ActiveSupport::Concern
Included in:
PowerApi::BaseController
Defined in:
app/controllers/concerns/api/error.rb

Instance Method Summary collapse

Instance Method Details

#respond_api_error(status, error = {}) ⇒ Object



34
35
36
# File 'app/controllers/concerns/api/error.rb', line 34

def respond_api_error(status, error = {})
  render json: error, status: status
end