Class: BlazerJSONAPI::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/blazer_json_api/application_controller.rb

Direct Known Subclasses

QueriesController

Instance Method Summary collapse

Instance Method Details

#record_not_foundObject



12
13
14
# File 'app/controllers/blazer_json_api/application_controller.rb', line 12

def record_not_found
  render json: [], status: :not_found
end

#render_errors(error_messages, status: :bad_request) ⇒ Object



16
17
18
# File 'app/controllers/blazer_json_api/application_controller.rb', line 16

def render_errors(error_messages, status: :bad_request)
  render json: { errors: error_messages }, status: status
end