aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorEloy Duran <eloy.de.enige@gmail.com>2010-01-08 21:44:06 +0100
committerEloy Duran <eloy.de.enige@gmail.com>2010-01-08 21:47:17 +0100
commit7f775ef1a92129fcc77079bc8e00c99a75b38a38 (patch)
tree549b2e03c1fbaa8890a70e30c4c5370160c7daaf /activerecord/lib/active_record/associations.rb
parentf2aacd51405724cdf7cfd36a439c9dbfce16973a (diff)
downloadrails-7f775ef1a92129fcc77079bc8e00c99a75b38a38.tar.gz
rails-7f775ef1a92129fcc77079bc8e00c99a75b38a38.tar.bz2
rails-7f775ef1a92129fcc77079bc8e00c99a75b38a38.zip
Renamed AssociationReflection #collection_association? to #collection?.
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 1320f5b624..aceb83044b 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1770,7 +1770,7 @@ module ActiveRecord
end
def using_limitable_reflections?(reflections)
- reflections.collect(&:collection_association?).length.zero?
+ reflections.collect(&:collection?).length.zero?
end
def column_aliases(join_dependency)
@@ -1843,7 +1843,7 @@ module ActiveRecord
case associations
when Symbol, String
reflection = base.reflections[associations]
- if reflection && reflection.collection_association?
+ if reflection && reflection.collection?
records.each { |record| record.send(reflection.name).target.uniq! }
end
when Array
@@ -1857,7 +1857,7 @@ module ActiveRecord
parent_records = []
records.each do |record|
if descendant = record.send(reflection.name)
- if reflection.collection_association?
+ if reflection.collection?
parent_records.concat descendant.target.uniq
else
parent_records << descendant