Permalink
Browse files

use any? instead of !empty?

  • Loading branch information...
1 parent d023078 commit af64ac4e5ce8406137d5520fa88e8f652ab703e9 @oscardelben oscardelben committed Nov 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activemodel/lib/active_model/dirty.rb
@@ -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.

0 comments on commit af64ac4

Please sign in to comment.