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:
parent
d023078b95
commit
af64ac4e5c
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue