Relative Content

Tag Archive for ruby-on-railsrubyactiverecord

saved_changes is empty after persisting changes on a Rails model

We have a Rails 6.1 application running an after_commit callback to look into saved_changes value to run some background workers. But the issue is saved_changes returns empty if a model has accepts_nested_attributes_for. It is not only after_commit other callbacks like before_save, and around_save also return empty saved_changes value.