diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-11-09 15:12:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 15:12:38 -0500 |
commit | 100c62ae15deb3d70c5e17d880fd57971bb8759a (patch) | |
tree | 736119c8ea9b683ac465c07e6a640d7e14bbc1b0 /activerecord/lib/active_record/model_schema.rb | |
parent | dac7c8844b4d9944eaa0fca98b45ee478cdb7201 (diff) | |
parent | c3675f50d2e59b7fc173d7b332860c4b1a24a726 (diff) | |
download | rails-100c62ae15deb3d70c5e17d880fd57971bb8759a.tar.gz rails-100c62ae15deb3d70c5e17d880fd57971bb8759a.tar.bz2 rails-100c62ae15deb3d70c5e17d880fd57971bb8759a.zip |
Merge pull request #30985 from lugray/attribute_set_in_am
Move Attribute and AttributeSet to ActiveModel
Diffstat (limited to 'activerecord/lib/active_record/model_schema.rb')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index bed9400f51..12ee4a4137 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -323,7 +323,7 @@ module ActiveRecord end def attributes_builder # :nodoc: - @attributes_builder ||= AttributeSet::Builder.new(attribute_types, primary_key) do |name| + @attributes_builder ||= ActiveModel::AttributeSet::Builder.new(attribute_types, primary_key) do |name| unless columns_hash.key?(name) _default_attributes[name].dup end @@ -346,7 +346,7 @@ module ActiveRecord end def yaml_encoder # :nodoc: - @yaml_encoder ||= AttributeSet::YAMLEncoder.new(attribute_types) + @yaml_encoder ||= ActiveModel::AttributeSet::YAMLEncoder.new(attribute_types) end # Returns the type of the attribute with the given name, after applying @@ -376,7 +376,7 @@ module ActiveRecord end def _default_attributes # :nodoc: - @default_attributes ||= AttributeSet.new({}) + @default_attributes ||= ActiveModel::AttributeSet.new({}) end # Returns an array of column names as strings. |