diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-08-15 13:45:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 13:45:18 -0400 |
commit | 171803f6b7bbab2dcf8ddf192972ae31fa92d4fe (patch) | |
tree | 15b08278d840f3428c3faddbad1300a9b4a13541 /activerecord | |
parent | ae87217382a4f1f2bdfcdcb8ca6d486ec96e8d6c (diff) | |
parent | ceaafe52b91751aa210c2df9c4cde59e7448be3d (diff) | |
download | rails-171803f6b7bbab2dcf8ddf192972ae31fa92d4fe.tar.gz rails-171803f6b7bbab2dcf8ddf192972ae31fa92d4fe.tar.bz2 rails-171803f6b7bbab2dcf8ddf192972ae31fa92d4fe.zip |
Merge pull request #30272 from kamipo/dont_expose_write_attribute_without_type_cast
Don't expose `write_attribute_without_type_cast`
Diffstat (limited to 'activerecord')
-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) |