aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-06-23 09:48:47 -0600
committerSean Griffin <sean@thoughtbot.com>2014-06-23 09:54:06 -0600
commitae96f229f6501d8635811d6b22d75d43cdb880a4 (patch)
tree57d224d09a4617f74b3ef980cf92173806765020 /activerecord/lib/active_record/associations
parent936fd4c1e017ec88699b3cd7daa09847da36c731 (diff)
downloadrails-ae96f229f6501d8635811d6b22d75d43cdb880a4.tar.gz
rails-ae96f229f6501d8635811d6b22d75d43cdb880a4.tar.bz2
rails-ae96f229f6501d8635811d6b22d75d43cdb880a4.zip
Add a deprecation cycle for `NullColumn` from `column_for_attribute`
This is public API, and `simple_form` depends on the `nil` return value. We need to go through a deprecation cycle to return a null object. If people want hash access, they can access the hash.
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/preloader/association.rb4
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 33c8619359..441768f302 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.column_for_attribute(association_key_name).type
+ @klass.type_for_attribute(association_key_name.to_s).type
end
def owner_key_type
- @model.column_for_attribute(owner_key_name).type
+ @model.type_for_attribute(owner_key_name.to_s).type
end
def load_slices(slices)