humanize_boolean
Adds the humanize method for true and false to provide 'Yes' and 'No' respectively.
humanize_boolean also natively supports i18n translations too so it can be used in internationalized rails apps.
i18n keys are locale.boolean.yes and locale.boolean.no
Installation
Add this line to your application's Gemfile:
gem 'humanize_boolean'
And then execute:
$ bundle
Or install it yourself as:
$ gem install humanize_boolean
Usage
true.humanize # => "Yes"
false.humanize # => "No"
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request