module Redstream::Model
Include Redstream::Model
in your model to stream the model's updates via redis streams.
@example
class User < ActiveRecord::Base include Redstream::Model # ... redstream_callbacks end
Constants
- IVAR_DELAY_MESSAGE_ID
Public Class Methods
included(base)
click to toggle source
# File lib/redstream/model.rb, line 17 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
redstream_payload()
click to toggle source
Override to customize the message payload. By default, the payload consists of the record id only (see example 1).
@example Default
def redstream_payload { id: id } end
# File lib/redstream/model.rb, line 64 def redstream_payload { id: id } end