1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed bug introduced in #24519. Makes build green again

This commit is contained in:
Bogdan Gusiev 2016-04-13 21:13:33 +03:00
parent e25d7a78b5
commit 80b9e5d7bd

View file

@ -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