rails/rails — pull request #16646 by sgrif (2014-08-22 18:26:56+00:00)
Title: Cache the value of `changed_attributes` when calling `changes_applied`

`changes_applied` calles `changes`, which will call `changed_attributes`
multiple times in a loop. This method actually performs work now, so we
should cache the results while looping over it when we know it cannot
change.