aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2018-07-05 20:14:41 +0200
committerGitHub <noreply@github.com>2018-07-05 20:14:41 +0200
commitbdd665c8c63629c52e5fd39d6137386be924d5bf (patch)
tree826de12667343da1ec2b084f0de72a961915a050
parentba38e13c8272f1d10cf2381d6e5d3021020c6f62 (diff)
parent0cd36e2b22d9a6ef96364f97046d5fa47afcbc42 (diff)
downloadrails-bdd665c8c63629c52e5fd39d6137386be924d5bf.tar.gz
rails-bdd665c8c63629c52e5fd39d6137386be924d5bf.tar.bz2
rails-bdd665c8c63629c52e5fd39d6137386be924d5bf.zip
Merge pull request #33297 from claudiob/shorter-attribute_previous_change
Shorter code: remove unnecessary condition
-rw-r--r--activemodel/lib/active_model/dirty.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index eaf8dfb223..093052a70c 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -304,7 +304,7 @@ module ActiveModel
# Handles <tt>*_previous_change</tt> for +method_missing+.
def attribute_previous_change(attr)
- previous_changes[attr] if attribute_previously_changed?(attr)
+ previous_changes[attr]
end
# Handles <tt>*_will_change!</tt> for +method_missing+.