I\'m using Rails 3.2.3 with the money-rails gem and I\'ve got a product model which has the following:
My model
class Product < ActiveRecord::Base
Added 'currency:string' to my model
Apparently in Rails 3.2 and above arbitrary attributes (attributes not stored in the database) are no longer allowed. There doesn't seem to be a way around it.
Here is the commit for the deprecation message: https://github.com/rails/rails/commit/b2955edc and here is why: https://github.com/rails/rails/commit/50d395f96ea05da1e02459688e94bff5872c307b
In your case price_cents and currency still need to be stored in the database and then your composed class will take it from there.