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 = Foo.new foo.bar = "1" foo.bar #=> true foo.bar? #=> 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'': https://rails.lighthouseapp.com/projects/8994/tickets/5622-boolean_attr_accessor Would be grateful to hear people''s thoughts on this. Many thanks, ~ Mark Dodwell http://madeofcode.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.