diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-20 11:31:00 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-20 11:31:00 -0700 |
commit | 5751689a68a122a1ef7892289c8683aeda4b2482 (patch) | |
tree | 59b6beb27ff8f1c922d753191f5380efbc7239b6 /activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb | |
parent | 1ea4a892a835ada735ba2943b20bdbfd39120e8c (diff) | |
download | rails-5751689a68a122a1ef7892289c8683aeda4b2482.tar.gz rails-5751689a68a122a1ef7892289c8683aeda4b2482.tar.bz2 rails-5751689a68a122a1ef7892289c8683aeda4b2482.zip |
exposing target records on the preloader
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb index c042a44b21..87992a70e8 100644 --- a/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb @@ -40,9 +40,9 @@ module ActiveRecord end end - def type_caster(results, name) + def set_type_caster(results, name) caster = results.column_types.fetch(name, results.identity_type) - lambda { |value| caster.type_cast value } + @type_caster = lambda { |value| caster.type_cast value } end def build_scope |