10 lines
225 B
Ruby
10 lines
225 B
Ruby
class ApplicationController < ActionController::API
|
|
rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
|
|
|
|
private
|
|
|
|
def render_not_found
|
|
render json: { error: "not_found" }, status: :not_found
|
|
end
|
|
end
|