aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2010-05-18 22:49:19 -0300
committerJosé Valim <jose.valim@gmail.com>2010-06-07 10:45:47 +0200
commit7eedc3f3975cca2b7e729fcb67e310977b5e5dcd (patch)
tree1930f68b340ab0182557786246c5c86f6d39e3ba /activerecord/lib
parent3f1cdb85b80b935791018e59161e527617af6f1f (diff)
downloadrails-7eedc3f3975cca2b7e729fcb67e310977b5e5dcd.tar.gz
rails-7eedc3f3975cca2b7e729fcb67e310977b5e5dcd.tar.bz2
rails-7eedc3f3975cca2b7e729fcb67e310977b5e5dcd.zip
Fixing test class names and refactor line in autosave association
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/autosave_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb
index c553e95bad..59a7bc1da1 100644
--- a/activerecord/lib/active_record/autosave_association.rb
+++ b/activerecord/lib/active_record/autosave_association.rb
@@ -243,7 +243,7 @@ module ActiveRecord
if [:belongs_to, :has_one].include?(reflection.macro)
return true if association.target && association.target.changed_for_autosave?
else
- association.target.each {|record| return true if record.changed_for_autosave? }
+ return true if association.target.detect { |record| record.changed_for_autosave? }
end
end
end