diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-04 06:26:03 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-04 06:26:03 -0600 |
commit | e8375a662bc47647f4bd39779ada018cc634fe97 (patch) | |
tree | a608f3df3c8d652d5749ee78cc8d74eea972aa02 /activerecord/lib/active_record/associations/preloader | |
parent | 0329d59a65a5afbf57de83670e3e05e4a73815e4 (diff) | |
download | rails-e8375a662bc47647f4bd39779ada018cc634fe97.tar.gz rails-e8375a662bc47647f4bd39779ada018cc634fe97.tar.bz2 rails-e8375a662bc47647f4bd39779ada018cc634fe97.zip |
Use null column for association key types
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/association.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index 1b83700613..33c8619359 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -104,13 +104,11 @@ module ActiveRecord end def association_key_type - column = @klass.column_types[association_key_name.to_s] - column && column.type + @klass.column_for_attribute(association_key_name).type end def owner_key_type - column = @model.column_types[owner_key_name.to_s] - column && column.type + @model.column_for_attribute(owner_key_name).type end def load_slices(slices) |