diff options
author | lulalala <mark@goodlife.tw> | 2018-04-03 13:06:04 +0800 |
---|---|---|
committer | lulalala <mark@goodlife.tw> | 2019-03-31 22:59:12 +0800 |
commit | 86620cc3aa8e2630bc8d934b1a86453276b9eee9 (patch) | |
tree | f9853d8b8b55469c8e0a9facca31c647337c23ea /activerecord/lib | |
parent | 2a06f13099b3344e93198728795209bc69501d4a (diff) | |
download | rails-86620cc3aa8e2630bc8d934b1a86453276b9eee9.tar.gz rails-86620cc3aa8e2630bc8d934b1a86453276b9eee9.tar.bz2 rails-86620cc3aa8e2630bc8d934b1a86453276b9eee9.zip |
Allow errors to remove duplicates, and ensure cyclic associations w/ autosave duplicate errors can be removed
See SHA 7550f0a016ee6647aaa76c0c0ae30bebc3867288
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 453c6e4c8c..e05b7cd6d2 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -491,9 +491,7 @@ module ActiveRecord end def _ensure_no_duplicate_errors - errors.messages.each_key do |attribute| - errors[attribute].uniq! - end + errors.uniq! end end end |