From 80b9e5d7bde7b8b4c4479e20c927e9cf8fa158ac Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Wed, 13 Apr 2016 21:13:33 +0300 Subject: [PATCH] Fixed bug introduced in #24519. Makes build green again --- activemodel/lib/active_model/dirty.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 38c0ab6c32f..90047c3c128 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -178,7 +178,7 @@ module ActiveModel # Handles *_changed? 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