diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-13 11:31:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 11:31:31 +0900 |
commit | a47449891421a727d751c0df929358e6aa89cd8a (patch) | |
tree | 1e63a7553e9c0127baf1d86f6d55ecac9f1acef4 /activemodel/lib/active_model/dirty.rb | |
parent | 319c295bbacb9d6b66b1cb437fc2538ade89a24d (diff) | |
parent | c9d75177fe87ee1348c79d042c6449970eb47879 (diff) | |
download | rails-a47449891421a727d751c0df929358e6aa89cd8a.tar.gz rails-a47449891421a727d751c0df929358e6aa89cd8a.tar.bz2 rails-a47449891421a727d751c0df929358e6aa89cd8a.zip |
Merge pull request #35961 from shioyama/rename_method_missing_target
Rename method_missing_target to target
Diffstat (limited to 'activemodel/lib/active_model/dirty.rb')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index ab2c9d04ae..35a587658c 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -165,17 +165,17 @@ module ActiveModel mutations_from_database.changed_attribute_names end - # Handles <tt>*_changed?</tt> for +method_missing+. + # Dispatch target for <tt>*_changed?</tt> attribute methods. def attribute_changed?(attr_name, **options) # :nodoc: mutations_from_database.changed?(attr_name.to_s, options) end - # Handles <tt>*_was</tt> for +method_missing+. + # Dispatch target for <tt>*_was</tt> attribute methods. def attribute_was(attr_name) # :nodoc: mutations_from_database.original_value(attr_name.to_s) end - # Handles <tt>*_previously_changed?</tt> for +method_missing+. + # Dispatch target for <tt>*_previously_changed?</tt> attribute methods. def attribute_previously_changed?(attr_name) # :nodoc: mutations_before_last_save.changed?(attr_name.to_s) end @@ -253,22 +253,22 @@ module ActiveModel @mutations_before_last_save ||= ActiveModel::NullMutationTracker.instance end - # Handles <tt>*_change</tt> for +method_missing+. + # Dispatch target for <tt>*_change</tt> attribute methods. def attribute_change(attr_name) mutations_from_database.change_to_attribute(attr_name.to_s) end - # Handles <tt>*_previous_change</tt> for +method_missing+. + # Dispatch target for <tt>*_previous_change</tt> attribute methods. def attribute_previous_change(attr_name) mutations_before_last_save.change_to_attribute(attr_name.to_s) end - # Handles <tt>*_will_change!</tt> for +method_missing+. + # Dispatch target for <tt>*_will_change!</tt> attribute methods. def attribute_will_change!(attr_name) mutations_from_database.force_change(attr_name.to_s) end - # Handles <tt>restore_*!</tt> for +method_missing+. + # Dispatch target for <tt>restore_*!</tt> attribute methods. def restore_attribute!(attr_name) attr_name = attr_name.to_s if attribute_changed?(attr_name) |