Guest User

Untitled

a guest
May 27th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # this will allow admin to manually disconnect all user's device
  2. # to protect user in dangerous case such as device is stolen
  3. module Admin
  4. class AdminController
  5. def disconnect_all_devices
  6. account = Account.find_by(id: params[:id])
  7. account.devices.each { |device| device.disconnect! }
  8. end
  9. end
  10. end
Add Comment
Please, Sign In to add comment