diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-08 11:50:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-08 11:50:16 -0800 |
commit | b8d57a0400f95abe1b87634e9cada8868ff0a22e (patch) | |
tree | 7d3b700b4cdc5dac0c58078a055bec07c7ef46e2 /activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | |
parent | f4223cc7abeeae5f4849eab27951faa55f3c6996 (diff) | |
download | rails-b8d57a0400f95abe1b87634e9cada8868ff0a22e.tar.gz rails-b8d57a0400f95abe1b87634e9cada8868ff0a22e.tar.bz2 rails-b8d57a0400f95abe1b87634e9cada8868ff0a22e.zip |
have table_aliases call count_aliases to set the default value
Diffstat (limited to 'activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | 4 |
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 2c20e304d0..15c1e7de55 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 @@ -77,10 +77,6 @@ module ActiveRecord protected def aliased_table_name_for(name, suffix = nil) - if @join_dependency.table_aliases[name].zero? - @join_dependency.table_aliases[name] = @join_dependency.count_aliases_from_table_joins(name) - end - 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 |