aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorPat Allan <pat@freelancing-gods.com>2017-06-20 19:43:21 +1000
committerPat Allan <pat@freelancing-gods.com>2017-06-20 19:43:21 +1000
commitb86e313df53ada181850a057e254052f38014738 (patch)
tree41531a72563ec51568ca703aa0284acb689a75e0 /activerecord/lib/active_record/associations
parent4ff30d9bb6d5d591fbb3952112d721c995059302 (diff)
downloadrails-b86e313df53ada181850a057e254052f38014738.tar.gz
rails-b86e313df53ada181850a057e254052f38014738.tar.bz2
rails-b86e313df53ada181850a057e254052f38014738.zip
Make ActiveRecord frozen string literal friendly.
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb
index 643226267c..dfe8f221d8 100644
--- a/activerecord/lib/active_record/associations/join_dependency.rb
+++ b/activerecord/lib/active_record/associations/join_dependency.rb
@@ -197,8 +197,7 @@ module ActiveRecord
def table_alias_for(reflection, parent, join)
name = "#{reflection.plural_name}_#{parent.table_name}"
- name << "_join" if join
- name
+ join ? "#{name}_join" : name
end
def walk(left, right)