Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix monetized_attributes class discrepancy
Suppose we have a model ```ruby class Investment < ActiveRecord::Base monetize :value monetize :discounted_value end ``` and a subclass ```ruby class BadInvestment < Investment end ``` When we check the monetized_attributes of both the `Product` and `SpecialProduct` we get seemingly the same result: ```ruby Investment.monetized_attributes # => { value: value_cents, discounted_value: discounted_value_cents, } BadInvestment.monetized_attributes # => { value: value_cents, discounted_value: discounted_value_cents, } ``` ...but when we check the class of the `monetized_attributes` we can see that one is a `ActiveSupport::HashWithIndifferentAccess` while the other is a `Hash`. This commit fixes the discrepancy, ensuring both are a `ActiveSupport::HashWithIndifferentAccess`.
- Loading branch information