Module: Redstream::Model
- Defined in:
- lib/redstream/model.rb
Overview
Include Redstream::Model in your model to stream the model’s updates via redis streams.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#redstream_payload ⇒ Object
Override to customize the message payload.
Class Method Details
.included(base) ⇒ Object
15 16 17 |
# File 'lib/redstream/model.rb', line 15 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#redstream_payload ⇒ Object
Override to customize the message payload. By default, the payload consists of the record id only (see example 1).
58 59 60 |
# File 'lib/redstream/model.rb', line 58 def redstream_payload { id: id } end |