Flowdock
method

stream_for

Importance_1
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: Streams
stream_for(model, callback = nil, coder: nil, &block) public

Start streaming the pubsub queue for the model in this channel. Optionally, you can pass a callback that’ll be used instead of the default of just transmitting the updates straight to the subscriber.

Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. Defaults to coder: nil which does no decoding, passes raw messages.

Show source
Register or log in to add new notes.