method
xml_http_request?
rails latest stable - Class:
ActionDispatch::Request
xml_http_request?()public
Returns true if the X-Requested-With header contains “XMLHttpRequest” (case-insensitive), which may need to be manually added depending on the choice of JavaScript libraries and frameworks.