Sha256: f569e984545a764271e03b6eb7bd200768a4dbad8e7ac9874d761f138699e9b7
Contents?: true
Size: 514 Bytes
Versions: 1
Compression:
Stored size: 514 Bytes
Contents
module Websocketable module Blueprinter module Helper def broadcast_for_channel(channel, blueprint, resource) ActionCable.server.broadcast channel, hashable(blueprint, resource) head :ok end def broadcast_to_channel(channel, resource) channel.broadcast_to resource, hashable(blueprint, resource) head :ok end private def hashable(blueprint, resource) blueprint.render_as_hash(resource) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
websocketable-0.0.3 | lib/websocketable/blueprinter/helper.rb |