aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorBogdan Gusiev <agresso@gmail.com>2016-04-13 21:13:33 +0300
committerBogdan Gusiev <agresso@gmail.com>2016-04-13 21:13:33 +0300
commit80b9e5d7bde7b8b4c4479e20c927e9cf8fa158ac (patch)
tree1cc2ca3209944d6aa6cb925dfa5e90beb272727f /activemodel
parente25d7a78b517e90608b0d1d03a44c78bec400fa7 (diff)
downloadrails-80b9e5d7bde7b8b4c4479e20c927e9cf8fa158ac.tar.gz
rails-80b9e5d7bde7b8b4c4479e20c927e9cf8fa158ac.tar.bz2
rails-80b9e5d7bde7b8b4c4479e20c927e9cf8fa158ac.zip
Fixed bug introduced in #24519. Makes build green again
Diffstat (limited to 'activemodel')
-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 38c0ab6c32..90047c3c12 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -178,7 +178,7 @@ module ActiveModel
# Handles <tt>*_changed?</tt> for +method_missing+.
def attribute_changed?(attr, from: OPTION_NOT_GIVEN, to: OPTION_NOT_GIVEN) # :nodoc:
- changes_include?(attr) &&
+ !!changes_include?(attr) &&
(to == OPTION_NOT_GIVEN || to == __send__(attr)) &&
(from == OPTION_NOT_GIVEN || from == changed_attributes[attr])
end