aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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