aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/join_dependency
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-01-14 09:59:26 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-01-14 09:59:26 +0900
commita557ab00f51e28d5609837f02fcc66d519615d3a (patch)
treed54db1c1cf6a10036a525736a5b9f289949a47ec /activerecord/lib/active_record/associations/join_dependency
parentf5ab4055b909e7b325304c5a7e414c28bbe441b7 (diff)
downloadrails-a557ab00f51e28d5609837f02fcc66d519615d3a.tar.gz
rails-a557ab00f51e28d5609837f02fcc66d519615d3a.tar.bz2
rails-a557ab00f51e28d5609837f02fcc66d519615d3a.zip
`substitute_at` is no longer used
Arel handles substitution for bind parameters by now.
Diffstat (limited to 'activerecord/lib/active_record/associations/join_dependency')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
index a6ad09a38a..be65cf318c 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -74,9 +74,8 @@ module ActiveRecord
value = foreign_klass.base_class.name
column = klass.columns_hash[reflection.type.to_s]
- substitute = klass.connection.substitute_at(column)
binds << Relation::QueryAttribute.new(column.name, value, klass.type_for_attribute(column.name))
- constraint = constraint.and table[reflection.type].eq substitute
+ constraint = constraint.and table[reflection.type].eq(Arel::Nodes::BindParam.new)
end
joins << table.create_join(table, table.create_on(constraint), join_type)