aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-01-03 05:14:18 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-01-03 05:14:18 +0900
commita954e1e81711def521644050db9a08f073d0636c (patch)
treeeab81fb8832c5cf78b0e36ec962c2f71b26c02fa /activemodel
parent921b877c2fd51cc0abdcf0ef6ca3528808047056 (diff)
parentba2190b3b6e506d7e5cede710594b22f9d937f39 (diff)
downloadrails-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')
-rw-r--r--activemodel/lib/active_model/attribute.rb4
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