Class: Cable::ChannelPurgesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/solid_stack_web/cable/channel_purges_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



3
4
5
6
# File 'app/controllers/solid_stack_web/cable/channel_purges_controller.rb', line 3

def destroy
  ::SolidCable::Message.where(channel_hash: params[:channel_hash]).delete_all
  redirect_to cable_path, notice: "All messages for this channel have been purged."
end