diff options
author | ThibG <thib@sitedethib.com> | 2018-08-19 09:46:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 09:46:26 +0200 |
commit | 484b9314e351fcab9e25b04c0024598433d2d688 (patch) | |
tree | 301ba59a7d214d5cf655263c95d731b9f18b6566 /app/controllers/admin | |
parent | 44e31c3e531e5c206003b7ed83ee1d6fdd3b2b53 (diff) | |
parent | 88a0395a58739ff0a4bc8ff79bc0b60ac2c0f736 (diff) |
Merge pull request #652 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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 |