aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-11-16 18:05:41 -0500
committerGitHub <noreply@github.com>2018-11-16 18:05:41 -0500
commitef5478d326d78d1e2b567c23b4a7c16b69dc72b2 (patch)
tree2cf318f5dc712b8f72e4288eec356512b0ad5842
parent14e49c2e28e2be4d97d132e99dd92ae9c4ddb4a9 (diff)
parent5fb432e9c25ed97531400ab4793007df0e87a4e6 (diff)
downloadrails-ef5478d326d78d1e2b567c23b4a7c16b69dc72b2.tar.gz
rails-ef5478d326d78d1e2b567c23b4a7c16b69dc72b2.tar.bz2
rails-ef5478d326d78d1e2b567c23b4a7c16b69dc72b2.zip
Merge pull request #34464 from gmcgibbon/re_add_changes_applied_doc
Re-add changes_applied doc
-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