Class: IronAdmin::LiveController

Inherits:
ApplicationController show all
Defined in:
app/controllers/iron_admin/live_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
# File 'app/controllers/iron_admin/live_controller.rb', line 5

def show
  return head(:not_found) unless IronAdmin::Live.polling?

  render plain: IronAdmin::Live.poll_cache.fetch(params[:stream]).join,
         content_type: Mime[:turbo_stream]
end