You may be interested in the Money gem here's a dodgy link to the docs http://gemjack.com/gems/money-1.7.1/index.html. Anyway overriding ActiveRecord accessors is not exactly the same than rewriting generic ruby accessors.
try something like this
def unit_price=(price) write_attribute :unit_price, price.to_i end
Matt Rose wrote: