Merge pull request #3628 from oscardelben/refactoring

use any? instead of !empty?
This commit is contained in:
Yehuda Katz
2011-11-14 09:52:12 -08:00

View File

@@ -98,7 +98,7 @@ module ActiveModel
# person.name = 'bob'
# person.changed? # => true
def changed?
!changed_attributes.empty?
changed_attributes.any?
end
# List of attributes with unsaved changes.