aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-08 11:54:45 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-08 11:54:45 -0800
commitde4bd472c3298f0455de8e3862c31900184f3c31 (patch)
treec4111f7ee5bc5c58d7a3416bdc935b1679471271 /activerecord/lib
parentb8d57a0400f95abe1b87634e9cada8868ff0a22e (diff)
downloadrails-de4bd472c3298f0455de8e3862c31900184f3c31.tar.gz
rails-de4bd472c3298f0455de8e3862c31900184f3c31.tar.bz2
rails-de4bd472c3298f0455de8e3862c31900184f3c31.zip
remove code that could never be executed
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
index 15c1e7de55..9c43e9edd7 100644
--- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
@@ -80,10 +80,6 @@ module ActiveRecord
if !@join_dependency.table_aliases[name].zero? # We need an alias
name = active_record.connection.table_alias_for "#{pluralize(reflection.name)}_#{parent_table_name}#{suffix}"
@join_dependency.table_aliases[name] += 1
- if @join_dependency.table_aliases[name] == 1 # First time we've seen this name
- # Also need to count the aliases from the table_aliases to avoid incorrect count
- @join_dependency.table_aliases[name] += @join_dependency.count_aliases_from_table_joins(name)
- end
table_index = @join_dependency.table_aliases[name]
name = name[0..active_record.connection.table_alias_length-3] + "_#{table_index}" if table_index > 1
else