Wrong behavior of ActiveModel::Errors#dup is causing regressions on Rails master #4491

Merged
merged 2 commits into from Jan 17, 2012

2 participants

@pkondzior

Since ActiveModel::Errors instance keeps all error messages as hash
we should duplicate this object as well.

Previously ActiveModel::Errors was a subclass of ActiveSupport::OrderedHash,
which results in different behavior on dup, this may result in regression for
people relying on it.

I'm attaching also small cleanup of redundant code.

pkondzior added some commits Jan 16, 2012
@pkondzior pkondzior Fix ActiveModel::Errors#dup
Since ActiveModel::Errors instance keeps all error messages as hash
we should duplicate this object as well.

Previously ActiveModel::Errors was a subclass of ActiveSupport::OrderedHash,
which results in different behavior on `dup`, this may result in regression for
people relying on it.
5313eab
@pkondzior pkondzior Remove redundant #to_sym 6174d3b
@drogus drogus merged commit a200446 into rails:master Jan 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment