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:
Update: extended with to_bool solution for TrueClass and FalseClass from http://stackoverflow.com/a/3028378/473040
this way you can do
and
main reason for implementation is when you have model settra method, that can be set from f.e. simple form radio buttons
instead of