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

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
commit 1df22bbb0f

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.