diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 23:42:59 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:58:43 -0300 |
commit | 634ecdbf1b6401ded0e145b1e7c7f4808ad89398 (patch) | |
tree | 11a8fcd4f0dd1b9b9d49165ac36f7f8ba640f69b /activerecord/lib/active_record/associations/preloader | |
parent | 82043ab53cb186d59b1b3be06122861758f814b2 (diff) | |
download | rails-634ecdbf1b6401ded0e145b1e7c7f4808ad89398.tar.gz rails-634ecdbf1b6401ded0e145b1e7c7f4808ad89398.tar.bz2 rails-634ecdbf1b6401ded0e145b1e7c7f4808ad89398.zip |
Return a null column from `column_for_attribute` when no column exists.
This reverts commit ae96f229f6501d8635811d6b22d75d43cdb880a4.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods.rb
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index a6e1a24360..afcaa5d55a 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -104,11 +104,11 @@ module ActiveRecord end def association_key_type - @klass.type_for_attribute(association_key_name.to_s).type + @klass.column_for_attribute(association_key_name).type end def owner_key_type - @model.type_for_attribute(owner_key_name.to_s).type + @model.column_for_attribute(owner_key_name).type end def load_slices(slices) |