aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/join_helper.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-23 17:02:04 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-23 17:02:14 -0700
commit67978d624582c8aff1abeeadec9447bddd16ef3b (patch)
treebc01dbbf87ade7e903916b4d60da4a7804b6185d /activerecord/lib/active_record/associations/join_helper.rb
parentb8aebb0261470af3df4e55d125b1ce8e8bf1cb32 (diff)
downloadrails-67978d624582c8aff1abeeadec9447bddd16ef3b.tar.gz
rails-67978d624582c8aff1abeeadec9447bddd16ef3b.tar.bz2
rails-67978d624582c8aff1abeeadec9447bddd16ef3b.zip
eliminate conditional in JoinHelper
Diffstat (limited to 'activerecord/lib/active_record/associations/join_helper.rb')
-rw-r--r--activerecord/lib/active_record/associations/join_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/join_helper.rb b/activerecord/lib/active_record/associations/join_helper.rb
index 5a41b40c8f..27b70edf1a 100644
--- a/activerecord/lib/active_record/associations/join_helper.rb
+++ b/activerecord/lib/active_record/associations/join_helper.rb
@@ -19,7 +19,7 @@ module ActiveRecord
if reflection.source_macro == :has_and_belongs_to_many
tables << alias_tracker.aliased_table_for(
- (reflection.source_reflection || reflection).join_table,
+ reflection.source_reflection.join_table,
table_alias_for(reflection, true)
)
end