diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-03 05:14:18 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-03 05:14:18 +0900 |
commit | a954e1e81711def521644050db9a08f073d0636c (patch) | |
tree | eab81fb8832c5cf78b0e36ec962c2f71b26c02fa /activemodel/lib | |
parent | 921b877c2fd51cc0abdcf0ef6ca3528808047056 (diff) | |
parent | ba2190b3b6e506d7e5cede710594b22f9d937f39 (diff) | |
download | rails-a954e1e81711def521644050db9a08f073d0636c.tar.gz rails-a954e1e81711def521644050db9a08f073d0636c.tar.bz2 rails-a954e1e81711def521644050db9a08f073d0636c.zip |
Merge pull request #29018 from willbryant/missing_attributes_after_save
fix the dirty tracking code's save hook overwriting missing attributeā¦
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attribute.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/attribute.rb b/activemodel/lib/active_model/attribute.rb index b75ff80b31..27f3e38e31 100644 --- a/activemodel/lib/active_model/attribute.rb +++ b/activemodel/lib/active_model/attribute.rb @@ -233,6 +233,10 @@ module ActiveModel false end + def forgetting_assignment + dup + end + def with_type(type) self.class.new(name, type) end |