Rubygems | Latest Versions for nostalgiahttps://rubygems.org/gems2023-09-28T03:37:38Znostalgia (0.0.1)https://rubygems.org/gems/nostalgia/versions/0.0.12013-04-28T17:06:57ZAaron ScruggsRemember changes on ActiveRecord models even after they are saved.
Often I want to evaluate what changed on an object after it has saved and has been transactionally committed. One use case is enqueuenig a background job when a specific attribute changed. Typically you should wait until after_commit to enqueue the job. This ensures that your workers will have access to the updates that were being made inside the transaction. This is a problem because ActiveRecord forgets the changes after_save. This gem keeps those changes around for later inspection and evaluation.