AttributeMethodsについて
https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Dirty.html
before_save時の条件で使えるかも?
code:rb
before_save :fill_attributes, if will_save_change_to_name?