How to delete records of staff actions logs

How to delete records of staff actions logs
https://xxxxxxxxx.com/admin/logs/staff_action_logs

What problem are you trying to solve? They don’t take up much space, and it’s good to be able to tell who broke what when.

But something like this in rails:

UserHistory.where(action: 3).destroy_all

I don’t recommend it, but I think it does what you ask.

1 Like

I like cleanliness

UserHistory.destroy_all

Yeah. I’m not quite sure what “action: 3” is, but it was the one I saw for what appeared to be changes of system settings. Remove that and you’ll wipe them all away, including stuff like who banned what user, what users changed their usernames, and a bunch of other really useful stuff (unless this is a test site, I guess?)

If it’s an active forum, it’s a bad idea, and unless you’ve done something that you’re trying to hide, there’s a reasonable chance that you’ll be sorry.

1 Like