def requested_version
      accept_headers = request.headers["HTTP_ACCEPT"]
      return nil if accept_headers.nil?
      parts = accept_headers.split(",").map(&:strip)
      requested = parts.map{|part| part.match(/version=(\d+)/)[1] if part.match(/version=\d+/)}.detect{|i| !i.nil?}
      requested.to_i unless requested.nil?
    end
def requested_version
      accept_headers = request.headers["HTTP_ACCEPT"]
      return nil if accept_headers.nil?
      parts = accept_headers.split(",").map(&:strip)
      requested = parts.map{|part| part.match(/version=(\d+)/)[1] if part.match(/version=\d+/)}.detect{|i| !i.nil?}
      requested.to_i unless requested.nil?
    end
Public: Finds the API version requested in the request

 Returns the requested version, or nil if no version was specifically requested