otvorenesudy/otvorenesudy-api

View on GitHub
app/controllers/public/application_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
class Public::ApplicationController < ActionController::API
  include ActionController::MimeResponds
  include ActionController::ImplicitRender

  rescue_from ActiveRecord::RecordNotFound do
    render status: 404, json: { success: false, errors: ['Resource does not exist.'] }
  end

  protected

  def serialization_scope
    self
  end
end