Class: Spree::Admin::System::WaitingRoomSessionsController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::Admin::System::WaitingRoomSessionsController
- Defined in:
- app/controllers/spree/admin/system/waiting_room_sessions_controller.rb
Instance Method Summary collapse
- #index ⇒ Object
-
#kill ⇒ Object
Kills only the sessions the admin checked (Gmail-style select + delete), instead of the room's whole active set.
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/spree/admin/system/waiting_room_sessions_controller.rb', line 5 def index @filter = params[:filter] if params[:filter] == 'load_test' sessions = SpreeCmCommissioner::WaitingRoomSession.active sessions = sessions.load_test if @filter == 'load_test' @waiting_room_sessions = sessions.order(created_at: :desc).page(params[:page]).per(50) end |
#kill ⇒ Object
Kills only the sessions the admin checked (Gmail-style select + delete), instead of the room's whole active set. Firebase's active_sessions/full reflect this only on the next WaitingGuestsCaller run (they're a once-a-minute mirror, not live).
17 18 19 20 21 22 23 |
# File 'app/controllers/spree/admin/system/waiting_room_sessions_controller.rb', line 17 def kill ids = Array(params[:ids]) count = SpreeCmCommissioner::WaitingRoomSession.kill_by_ids!(ids) flash[:success] = "Killed #{count} waiting-room session(s)." redirect_back fallback_location: admin_system_waiting_room_sessions_path end |