app/controllers/qa/terms_controller.rb in qa-4.0.0 vs app/controllers/qa/terms_controller.rb in qa-4.1.0

- old
+ new

@@ -26,12 +26,13 @@ render json: terms end # If the subauthority supports it, return all the information for a given term def show - term = @authority.find(params[:id]) + term = @authority.method(:find).arity == 2 ? @authority.find(params[:id], self) : @authority.find(params[:id]) cors_allow_origin_header(response) - render json: term + content_type = params["format"] == "jsonld" ? 'application/ld+json' : 'application/json' + render json: term, content_type: content_type end def check_vocab_param return if params[:vocab].present? msg = "Required param 'vocab' is missing or empty"