diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-08-16 00:45:58 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-08-16 00:45:58 +0900 |
commit | ceaafe52b91751aa210c2df9c4cde59e7448be3d (patch) | |
tree | ac77e9ef2d037a27bba0064380dca70c54df2e43 /activerecord/lib | |
parent | fbeebded22f53337df339285164352f298639c63 (diff) | |
download | rails-ceaafe52b91751aa210c2df9c4cde59e7448be3d.tar.gz rails-ceaafe52b91751aa210c2df9c4cde59e7448be3d.tar.bz2 rails-ceaafe52b91751aa210c2df9c4cde59e7448be3d.zip |
Don't expose `write_attribute_without_type_cast`
`write_attribute_without_type_cast` is defined as a private method in
`AttributeMethods::Write`, but `AttributeMethods::Dirty` overrode it as
a public method. It should be kept the original visibility.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 48d33e6744..c622df132e 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -62,12 +62,6 @@ module ActiveRecord clear_mutation_trackers end - def write_attribute_without_type_cast(attr_name, *) # :nodoc: - result = super - clear_attribute_change(attr_name) - result - end - def clear_attribute_changes(attr_names) # :nodoc: super attr_names.each do |attr_name| @@ -183,6 +177,11 @@ module ActiveRecord end private + def write_attribute_without_type_cast(attr_name, _) + result = super + clear_attribute_change(attr_name) + result + end def mutation_tracker unless defined?(@mutation_tracker) |