From 35d77130a2c08f477ce5e7f2e5b28934ad393641 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Mon, 2 Feb 2015 11:02:50 -0700 Subject: Rename `user_provided_types` to something more meaningful `attributes_to_define_after_schema_loads` better describes the difference between `attribute` and `define_attribute`, and doesn't conflate terms since we no longer differentiate between "user provided" and "schema provided" types. --- activerecord/lib/active_record/attributes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activerecord/lib/active_record/attributes.rb b/activerecord/lib/active_record/attributes.rb index c1b69092bb..7cb6b075a0 100644 --- a/activerecord/lib/active_record/attributes.rb +++ b/activerecord/lib/active_record/attributes.rb @@ -5,8 +5,8 @@ module ActiveRecord Type = ActiveRecord::Type included do - class_attribute :user_provided_types, instance_accessor: false # :internal: - self.user_provided_types = {} + class_attribute :attributes_to_define_after_schema_loads, instance_accessor: false # :internal: + self.attributes_to_define_after_schema_loads = {} end module ClassMethods # :nodoc: @@ -77,7 +77,7 @@ module ActiveRecord name = name.to_s reload_schema_from_cache - self.user_provided_types = user_provided_types.merge(name => [cast_type, options]) + self.attributes_to_define_after_schema_loads = attributes_to_define_after_schema_loads.merge(name => [cast_type, options]) end def define_attribute( @@ -92,7 +92,7 @@ module ActiveRecord def load_schema! super - user_provided_types.each do |name, (type, options)| + attributes_to_define_after_schema_loads.each do |name, (type, options)| define_attribute(name, type, **options) end end -- cgit v1.2.3