We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nil
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: