ruby on rails - Keeping the history of model associations -


I have several models for which to keep their history indefinitely or at least for a very long time Application I keep track of daily attendance statistics for people in various organizations, and some other similar organizations have realized that due to the presence of user in any query for the presence of the user anytime I Can not delete user at any time The problem I am facing is finding a good way of keeping inquiries about those old associations, along with the old associations.

If I have a connecting table between users and organizations, then I can just add a new line between the user and the organization, the user is related to the new associations, and based on the date of the old people , But I really do not have a great way to do this, everything just looks ugly. I was just thinking that someone has presented something like this before, And possibly there was a solution already implemented. Thank you.

Create a is_deleted field so you can delete those "deleted" users, but Modify your code so that they behave in all places as if they were deleted, then you do not really need to delete the row and lose the data.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -