diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-11-16 18:05:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-16 18:05:41 -0500 |
commit | ef5478d326d78d1e2b567c23b4a7c16b69dc72b2 (patch) | |
tree | 2cf318f5dc712b8f72e4288eec356512b0ad5842 /activemodel | |
parent | 14e49c2e28e2be4d97d132e99dd92ae9c4ddb4a9 (diff) | |
parent | 5fb432e9c25ed97531400ab4793007df0e87a4e6 (diff) | |
download | rails-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
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 4 |
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 |