diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-10-31 11:30:14 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-10-31 11:30:14 -0600 |
commit | 9b9f0197b7e645ae5b05a5581ba82f32f0971183 (patch) | |
tree | 941324fe8afdb5d4ae925cd4b4b1ebb6ee334a80 /activerecord/lib/active_record/model_schema.rb | |
parent | 53ec0bc0551c696add0a5ffff506fc9e83065bc0 (diff) | |
download | rails-9b9f0197b7e645ae5b05a5581ba82f32f0971183.tar.gz rails-9b9f0197b7e645ae5b05a5581ba82f32f0971183.tar.bz2 rails-9b9f0197b7e645ae5b05a5581ba82f32f0971183.zip |
Rename `default_attributes` to `_default_attributes`
It is internal use only. This is to avoid conflicting with users' method
names. Fixes #17458
Diffstat (limited to 'activerecord/lib/active_record/model_schema.rb')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 48e82d28d9..31ff08a89d 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -247,10 +247,10 @@ module ActiveRecord # Returns a hash where the keys are column names and the values are # default values when instantiating the AR object for this table. def column_defaults - default_attributes.to_hash + _default_attributes.to_hash end - def default_attributes # :nodoc: + def _default_attributes # :nodoc: @default_attributes ||= attributes_builder.build_from_database( columns_hash.transform_values(&:default)) end |