diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-09-19 23:58:43 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-09-20 00:03:15 -0400 |
commit | a0482d39110860272a056593e0e5c6e2ef4d75b8 (patch) | |
tree | 98428d16d28143d12372d0136674bfa86e56afe3 /railties/lib/rails/secrets.rb | |
parent | e184d1a94e3ecfbc22823fbb9097992158a40cb2 (diff) | |
download | rails-a0482d39110860272a056593e0e5c6e2ef4d75b8.tar.gz rails-a0482d39110860272a056593e0e5c6e2ef4d75b8.tar.bz2 rails-a0482d39110860272a056593e0e5c6e2ef4d75b8.zip |
Make a deep copy of the _default_attributes in column_defaults
When column_defaults is called it calls `value` on each instance of
Attribute inside the _default_attributes set. Since value is memoized in
the Attribute instance and that Attribute instance is shared across all
instances of a model the next call to the default value will be memozied
not running the proc defined by the user.
Fixes #33031.
Diffstat (limited to 'railties/lib/rails/secrets.rb')
0 files changed, 0 insertions, 0 deletions