diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2018-09-20 11:58:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 11:58:20 -0600 |
commit | 8a908451b614d03db60da05c1525cfaf523189fa (patch) | |
tree | 561664a76a98440f94c31e76ad2476219c2ecc47 /activerecord/lib | |
parent | 0a829f7db10263c5bf5f8b4ee04ea92a05ecdd39 (diff) | |
parent | a0482d39110860272a056593e0e5c6e2ef4d75b8 (diff) | |
download | rails-8a908451b614d03db60da05c1525cfaf523189fa.tar.gz rails-8a908451b614d03db60da05c1525cfaf523189fa.tar.bz2 rails-8a908451b614d03db60da05c1525cfaf523189fa.zip |
Merge pull request #33925 from rafaelfranca/rm-fix-column_defaults
Make a deep copy of the _default_attributes in column_defaults
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 694ff85fa1..9b985e049b 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -375,7 +375,7 @@ module ActiveRecord # default values when instantiating the Active Record object for this table. def column_defaults load_schema - @column_defaults ||= _default_attributes.to_hash + @column_defaults ||= _default_attributes.deep_dup.to_hash end def _default_attributes # :nodoc: |