Make xml_http_request? / xhr? actually return a boolean

Currently “xml_http_request” returns a booleanish value that behaves accordingly when needed but it also breaks the general convention that methods with a “?” postfix should return “true” or “false” values.


request.xml_http_request? # => 0 / nil


request.xml_http_request? # => true / false

PR at

Doesn't `request.xhr?` cover that?

Pretty sure this is not a general convention that Rails follows. This seemed awful familiar, a quick google search brought me to: (which suggests that this type of issue is raised often).