boolean_attr_accessor ActiveSupport core extension

I often find myself needing to add boolean virtual attributes to
ActiveRecord models which need to work with form helpers in the view.
Basically emulating the way that real, column boolean attributes work
with ActiveRecord:

  foo = = "1" #=> true #=> true

After implementing this repeatedly, across multiple projects, I feel
like this could be a good candidate to encapsulate in a core extension
(along the lines of attr_accessor_with_default).

I created a lighthouse ticket, along with a patch, providing this
functionality in the form of 'boolean_attr_accessor':

Would be grateful to hear people's thoughts on this.

Many thanks,

~ Mark Dodwell