store_listing = StoreListing.new(price_in_cents: '10.1') # before store_listing.price_in_cents # => BigDecimal.new(10.1) StoreListing.new.my_string # => "original default" class StoreListing < ActiveRecord::Base attribute :price_in_cents, :integer # custom type attribute :my_string, :string, default: "new default" # default value attribute :my_default_proc, :datetime, default: -> { Time.now } # de

