app/controllers/api_controller/renderer.rb
#
# Return the response format requested, i.e. :json or raise an error
#
Return the response format requested, i.e. :json or raise an error
Return the response format requested i . e . : json or raise an error
def validate_response_format
      accept = request.headers["Accept"]
      return :json if accept.blank? || accept.include?("json") || accept.include?("*/*")
      raise UnsupportedMediaTypeError, "Invalid Response Format #{accept} requested"
    end
def validate_response_format accept = request . headers [ "Accept" ] return :json if accept . blank? || accept . include? ( "json" ) || accept . include? ( "*/*" ) raise UnsupportedMediaTypeError , "Invalid Response Format #{accept} requested" end
Return the response format requested, i.e.
Return the response format requested i . e .