RubyMoney/money-rails — pull request #240 by georgemillo (2014-11-21 05:08:07+00:00)
Title: Allowing aliased attributes to be monetized

Second attempt to fix the bug I described in PR [#229](https://github.com/RubyMoney/money-rails/pull/229/).

My original solution only worked in Rails 4.1+. This new fix also works in 4.0.x, but unfortunately I still can't figure out any way to fix it in Rails 3.x. I can't see how to do anything without access to the `aliased_attributes` variable that was introduced in Rails 4.

For the time being, this fixes the problem in at least some versions of Rails, and the test is marked pending if CI is using an older version. Once Rails 3.x support is dropped, whenever that may be, this won't be an issue anymore. (And once 4.1.x becomes the lowest supported version of Rails - probably a long way off, but it will happen eventually - then my first PR is still a better and cleaner solution than what I've committed here.)