aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorOscar Del Ben <info@oscardelben.com>2011-11-14 16:56:05 +0100
committerOscar Del Ben <info@oscardelben.com>2011-11-14 16:56:05 +0100
commitaf64ac4e5ce8406137d5520fa88e8f652ab703e9 (patch)
tree0410aea5bffe9ed087524df2ac14f1e5e975244f /activemodel
parentd023078b9598cf8a9226a33aa61a76458af5aad8 (diff)
downloadrails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.tar.gz
rails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.tar.bz2
rails-af64ac4e5ce8406137d5520fa88e8f652ab703e9.zip
use any? instead of !empty?
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/dirty.rb2
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.