|
|
@ -136,6 +136,9 @@ class ApplicationController < ActionController::Base
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def respond_with_error(code)
|
|
|
|
def respond_with_error(code)
|
|
|
|
render "errors/#{code}", layout: 'error', status: code, formats: [:html]
|
|
|
|
respond_to do |format|
|
|
|
|
|
|
|
|
format.any { render "errors/#{code}", layout: 'error', status: code, formats: [:html] }
|
|
|
|
|
|
|
|
format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[code] }, status: code }
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|