Module: EventSourceHelper

Defined in:
lib/generators/disco/app/templates/app/helpers/event_source_helper.rb

Instance Method Summary collapse

Instance Method Details

#event_source(projection) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/generators/disco/app/templates/app/helpers/event_source_helper.rb', line 2

def event_source(projection)
  ActiveEvent::EventSourceServer.projection_status(projection)
  event_id = read_and_clear_event_id
  if event_id
    (:div, '',
                class: 'event-source',
                data: {href: event_source_path(projection: projection, event: event_id)})
  end
end