diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-12-29 11:16:16 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-12-29 11:16:16 -0700 |
commit | 7931c96338353adc0ebfc780769ef3cd06ab0d79 (patch) | |
tree | 9bc3ba2a26b385dcb7d79ca1d57f24366be92f52 /activerecord/lib/active_record/core.rb | |
parent | 848cba13bd8a1fd7445458160a15dbf175c4c61d (diff) | |
download | rails-7931c96338353adc0ebfc780769ef3cd06ab0d79.tar.gz rails-7931c96338353adc0ebfc780769ef3cd06ab0d79.tar.bz2 rails-7931c96338353adc0ebfc780769ef3cd06ab0d79.zip |
Pass a type caster when aliasing tables for joins
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 3f714397d2..38b2d632d2 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -252,6 +252,10 @@ module ActiveRecord @predicate_builder ||= PredicateBuilder.new(table_metadata) end + def type_caster # :nodoc: + TypeCaster::Map.new(self) + end + private def relation # :nodoc: @@ -267,10 +271,6 @@ module ActiveRecord def table_metadata # :nodoc: TableMetadata.new(self, arel_table) end - - def type_caster # :nodoc: - TypeCaster::Map.new(self) - end end # New objects can be instantiated as either empty (pass no construction parameter) or pre-set with |