aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/table_metadata.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-26 15:49:29 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-26 15:49:29 -0700
commit6a7ac40dabf4a8948418c61f307ffe52ddcb48f2 (patch)
treec123d4db35c7291db4c1ddff2473f77c2759b9a5 /activerecord/lib/active_record/table_metadata.rb
parent9d4d2e7fc69e5eb0586e57259c2993143346a1b9 (diff)
downloadrails-6a7ac40dabf4a8948418c61f307ffe52ddcb48f2.tar.gz
rails-6a7ac40dabf4a8948418c61f307ffe52ddcb48f2.tar.bz2
rails-6a7ac40dabf4a8948418c61f307ffe52ddcb48f2.zip
Go through normal `where` logic in `AssociationScope`
This removes the need to duplicate much of the logic in `WhereClause` and `PredicateBuilder`, simplifies the code, removes the need for the connection adapter to be continuously passed around, and removes one place that cares about the internal representation of `bind_values` Part of the larger refactoring to change how binds are represented internally [Sean Griffin & anthonynavarre]
Diffstat (limited to 'activerecord/lib/active_record/table_metadata.rb')
-rw-r--r--activerecord/lib/active_record/table_metadata.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/table_metadata.rb b/activerecord/lib/active_record/table_metadata.rb
index 62a0c04a0f..3707fd3f04 100644
--- a/activerecord/lib/active_record/table_metadata.rb
+++ b/activerecord/lib/active_record/table_metadata.rb
@@ -43,7 +43,7 @@ module ActiveRecord
association_klass = association.klass
arel_table = association_klass.arel_table
else
- type_caster = TypeCaster::Connection.new(klass.connection, table_name)
+ type_caster = TypeCaster::Connection.new(klass, table_name)
association_klass = nil
arel_table = Arel::Table.new(table_name, type_caster: type_caster)
end