diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-08-19 09:27:18 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-08-19 09:27:18 +0200 |
commit | 88a0395a58739ff0a4bc8ff79bc0b60ac2c0f736 (patch) | |
tree | 301ba59a7d214d5cf655263c95d731b9f18b6566 /app/controllers/admin | |
parent | 44e31c3e531e5c206003b7ed83ee1d6fdd3b2b53 (diff) | |
parent | 59c68c1a74d5398b9c31489744ff8eca82e2ce50 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/invites_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/admin/invites_controller.rb b/app/controllers/admin/invites_controller.rb index faccaa7c8..44a8eec77 100644 --- a/app/controllers/admin/invites_controller.rb +++ b/app/controllers/admin/invites_controller.rb @@ -30,6 +30,12 @@ module Admin redirect_to admin_invites_path end + def deactivate_all + authorize :invite, :deactivate_all? + Invite.available.in_batches.update_all(expires_at: Time.now.utc) + redirect_to admin_invites_path + end + private def resource_params |