This gist was writen in 2012 and it was solving specific problem in Rails & SimpleForm. Some fellow developers were pointing out this may be out dated concept. That's why I advise everyone to read comment section bellow to have a full grasp of alternative solutions
other sources that may be helpful to understand why this may not be best idea:
Sometimes I like to be able to call to_bool on something that might be nil, so I alias the Ruby boolean operator default to everything and then further refine String:
app/config/initializers/to_bool.rb