'm working on a feature where a manager’s approval is needed before changes made by a user are considered. Here’s how it should work: users can make edits, but anyone else viewing or editing the same records will see the original values until the manager approves the changes.
I’m currently using ash_paper_trail
to track changes, which has been great. However, I want the changes to appear only in the main table (not in the version history) after the manager approves.
Is it possible to do this with ash_paper_trail
? If so, could someone guide me on how to set it up?
Example:
A user edits a record to update a customer’s address. While the change is pending manager approval, other users will still see the old address. Once the manager approves, the updated address should be the only one visible in the main table.