提交 1df22bbb 编写于 作者: Y Yehuda Katz

Merge pull request #3628 from oscardelben/refactoring

use any? instead of !empty?
......@@ -98,7 +98,7 @@ module Dirty
# person.name = 'bob'
# person.changed? # => true
def changed?
!changed_attributes.empty?
changed_attributes.any?
end
# List of attributes with unsaved changes.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册