In the past I'll display an index view of, let's say products. I'll also have a separate "trash" route which effectively is the same thing but it will display the soft deleted products, and give the user the opportunity to either delete them permanently from the trash, or restore them back to the main view.
On my latest project I've hit upon a bit of a problem which is more to do with the user interface than an actual programming issue.
I have an index view of people, and the same setup with a "trash" view for viewing soft deleted people. However, when viewing a person I also have an "inner" index view for their case history. The case history index view is related specifically to the person whose record you are accessing (i.e. it doesn't make sense to view the case history for everyone all at once).
I would like to handle soft deletes for the case history notes and provide a similar "trash" view where case history notes deleted by accident can be restored. But I am struggling to determine where such a view should go. If it's access from the "show" views of a person it's entirely possible that deleted case history notes will remain soft deleted forever if that person's record is not accessed frequently. In other words, you're not going to periodically click through every single person to clear out their soft deleted case history notes.
However, if I have a view that shows all soft deleted case history, it would be a list that is out of context to the various different people that the deleted case history notes belong to.
I would be open to suggestions as to how to handle this :-)