-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
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
object_changes
inserted by #touch is not correct value
#1121
Comments
Hmmm. Never mind, I was wrong, we are already doing that. Actually, this seems like a bug in rails. class User < ActiveRecord::Base
after_touch :inspect_saved_changes
def inspect_saved_changes
puts saved_changes.inspect
end
end
user = User.create(first_name: "Jane")
user.touch
# output
{"id"=>[nil, 1], "first_name"=>[nil, "Jane"], "created_at"=>[nil, 2018-07-24 04:22:55 UTC], "updated_at"=>[nil, 2018-07-24 04:22:55 UTC]} It seems that |
I opened an issue in rails about this: rails/rails#33429 |
Closing via b9c9e79 It is not perfect, but is an improvement. Further PRs on this subject are welcome. Thanks for the bug report, Fukaya-san. |
Splited from #1119
bug_report_pt_9_touch.rb
result
The text was updated successfully, but these errors were encountered: