Module: TurboReady::Patches::Broadcastable

Defined in:
lib/turbo_ready/patches/broadcastable.rb

Overview

Patch for Turbo::Broadcastable which is mixed into ActiveRecord SEE: github.com/hotwired/turbo-rails/blob/main/app/models/concerns/turbo/broadcastable.rb

Instance Method Summary collapse

Instance Method Details

#broadcast_invoke(method, **kwargs) ⇒ Object



14
15
16
# File 'lib/turbo_ready/patches/broadcastable.rb', line 14

def broadcast_invoke(method, **kwargs)
  broadcast_invoke_to(self, method, **kwargs)
end

#broadcast_invoke_later(method, **kwargs) ⇒ Object



18
19
20
# File 'lib/turbo_ready/patches/broadcastable.rb', line 18

def broadcast_invoke_later(method, **kwargs)
  broadcast_invoke_later_to(self, method, **kwargs)
end

#broadcast_invoke_later_to(*streamables, method, **kwargs) ⇒ Object



10
11
12
# File 'lib/turbo_ready/patches/broadcastable.rb', line 10

def broadcast_invoke_later_to(*streamables, method, **kwargs)
  Turbo::StreamsChannel.broadcast_invoke_later_to(*streamables, method, **kwargs)
end

#broadcast_invoke_to(*streamables, method, **kwargs) ⇒ Object



6
7
8
# File 'lib/turbo_ready/patches/broadcastable.rb', line 6

def broadcast_invoke_to(*streamables, method, **kwargs)
  Turbo::StreamsChannel.broadcast_invoke_to(*streamables, method, **kwargs)
end