BangBangXhr
It was a big discussion about using request.xhr?
to return boolean values instead of 0
or nil
.
You can read about rails/rails#5329 and
https://github.com/rails/rails/commit/3756a3fdfe8d339a53bf347487342f93fd9e1edb.
This gem is for these guys that want to be clear to use boolean values.
For Rails core team, don't pay attention to this gem, it just for fun.
Installation
Add this line to your application's Gemfile:
gem 'bang_bang_xhr'
And then execute:
$ bundle
Usage
request.xhr? # => true or false