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

use any? instead of !empty?

This commit is contained in:
Oscar Del Ben 2011-11-14 16:56:05 +01:00
parent d023078b95
commit af64ac4e5c

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.