rails/rails — pull request #16321 by mattfreer (2014-07-28 14:16:07+00:00)
Title: ActiveModel: prevent added? from mutating messages

Previously if `added?` was called for a nonexisting error then a key was added to the error message hash for the given attribute with an empty array value. This key is now deleted when no errors exist for the given attribute.