You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`.
0 commit comments