diff options
author | Oscar Del Ben <info@oscardelben.com> | 2011-11-14 16:56:05 +0100 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2011-11-14 16:56:05 +0100 |
commit | af64ac4e5ce8406137d5520fa88e8f652ab703e9 (patch) | |
tree | 0410aea5bffe9ed087524df2ac14f1e5e975244f | |
parent | d023078b9598cf8a9226a33aa61a76458af5aad8 (diff) | |
download | rails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.tar.gz rails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.tar.bz2 rails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.zip |
use any? instead of !empty?
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 166cccf161..026f077ee7 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -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. |