I am implementing a User that is not actually deleted from the system with destroy but only marked with :active = false
.
The problem here is that such an inactivate user will show up in all User.find
, User.all
, ... calls. I don't want to pollute the code with all kinds of 'if-else's or overwriting the behavior of .find
, .all
etc.
I just want to know whether I can nicely define it within the User's model so that inactive users will virtually disappear unless I explicitly want to extract such a user.
If there is no way to do it in the model then what are my options?