From a0bb19fbfa590a3a773a24bc018b92fd5ba93b4d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 1 Aug 2019 15:38:03 -0700 Subject: Add *_previously_was attribute methods when dirty tracking (#36836) --- activemodel/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 9d77564c61..c301f4766d 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,3 +1,9 @@ +* Add *_previously_was attribute methods when dirty tracking. Example: + pirate.update(catchphrase: "Ahoy!") + pirate.previous_changes["catchphrase"] # => ["Thar She Blows!", "Ahoy!"] + pirate.catchphrase_previously_was # => "Thar She Blows!" + + *DHH* Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/activemodel/CHANGELOG.md) for previous changes. -- cgit v1.2.3