Looks like it's impossible to detect the previous value of a property in the after callback in Rails 5.2.
I have a simple model:
class Profile < ApplicationRecord
typed_store :properties do |p|
p.string :phone
end
after_save :debug
def debug
puts "saved_change_to_phone #{saved_change_to_phone.inspect}"
end
end
p = Profile.create(phone: "123")
p.save
p = Profile.last
p.phone = "456"
p.save
# Displays:
# saved_change_to_phone nil