From 5fb432e9c25ed97531400ab4793007df0e87a4e6 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Fri, 16 Nov 2018 11:13:38 -0500 Subject: [PATCH] Re-add changes_applied doc [ci skip] --- activemodel/lib/active_model/dirty.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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