parent
c6eab9e0aa
commit
9dd5639f90
5 changed files with 34 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue