Skip to content

Commit

Permalink
Merge pull request rails#3628 from oscardelben/refactoring
Browse files Browse the repository at this point in the history
use any? instead of !empty?
  • Loading branch information
wycats committed Nov 14, 2011
2 parents be777b3 + af64ac4 commit 1df22bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activemodel/lib/active_model/dirty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1df22bb

Please sign in to comment.