Right now one can use the attributes API for custom types, but it doesn’t work with store attributes. The following method would fix that:
store_accessor :preferences, :show_avatar, :boolean, default: true
I’ve implemented a concern with this logic for a project I’m working on, and it works great.
Do you think it would be a nice addition to Rails?