aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-11-16 11:13:38 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2018-11-16 18:02:41 -0500
commit5fb432e9c25ed97531400ab4793007df0e87a4e6 (patch)
treef4d322ff035e7878f4718e11cc5205144b256057 /activemodel
parent207588174e691221c5d50ba2f96d126471c9863b (diff)
downloadrails-5fb432e9c25ed97531400ab4793007df0e87a4e6.tar.gz
rails-5fb432e9c25ed97531400ab4793007df0e87a4e6.tar.bz2
rails-5fb432e9c25ed97531400ab4793007df0e87a4e6.zip
Re-add changes_applied doc
[ci skip]
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/dirty.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index f0e1242554..0d9e761b1e 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -141,7 +141,9 @@ module ActiveModel
@mutations_from_database = nil
end
- def changes_applied # :nodoc:
+ # Clears dirty data and moves +changes+ to +previously_changed+ and
+ # +mutations_from_database+ to +mutations_before_last_save+ respectively.
+ def changes_applied
unless defined?(@attributes)
@previously_changed = changes
end