Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this will allow admin to manually disconnect all user's device
- # to protect user in dangerous case such as device is stolen
- module Admin
- class AdminController
- def disconnect_all_devices
- account = Account.find_by(id: params[:id])
- account.devices.each { |device| device.disconnect! }
- end
- end
- end
Add Comment
Please, Sign In to add comment