aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/sanitization.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-11-26 13:22:11 -0700
committerSean Griffin <sean@thoughtbot.com>2014-11-29 15:49:18 -0700
commitde239066e32d654f6815a94cdf8ce4b67b058726 (patch)
tree825d046317dad1cda8f2b4449a2ff7dbe15cc5ef /activerecord/lib/active_record/sanitization.rb
parent5493d16d9e2fbc8efb0535c7a704a83d460a1beb (diff)
downloadrails-de239066e32d654f6815a94cdf8ce4b67b058726.tar.gz
rails-de239066e32d654f6815a94cdf8ce4b67b058726.tar.bz2
rails-de239066e32d654f6815a94cdf8ce4b67b058726.zip
Stop using `Arel::Table.engine`
We never actually make use of it on the table, since we're constructing the select manager manually. It looks like if we ever actually were grabbing it from the table, we're grossly misusing it since it's meant to vary by AR class. Its existence on `Arel::Table` appears to be purely for convenience methods that are never used outside of tests. However, in production code it just complicates construction of the tables on the rails side, and the plan is to remove it from `Arel::Table` entirely. I'm not convinced it needs to live on `SelectManager`, etc either.
Diffstat (limited to 'activerecord/lib/active_record/sanitization.rb')
-rw-r--r--activerecord/lib/active_record/sanitization.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb
index 6a130c145b..88dfddebcc 100644
--- a/activerecord/lib/active_record/sanitization.rb
+++ b/activerecord/lib/active_record/sanitization.rb
@@ -93,7 +93,7 @@ sanitize_sql_hash_for_conditions is deprecated, and will be removed in Rails 5.0
attrs = PredicateBuilder.resolve_column_aliases self, attrs
attrs = expand_hash_conditions_for_aggregates(attrs)
- table = Arel::Table.new(table_name, arel_engine).alias(default_table_name)
+ table = Arel::Table.new(table_name).alias(default_table_name)
PredicateBuilder.build_from_hash(self, attrs, table).map { |b|
connection.visitor.compile b
}.join(' AND ')