Sha256: b84aa0ee4817b441f52dde405cee4466f36b87b2c8a8820a37e3483c9cb4c098
Contents?: true
Size: 468 Bytes
Versions: 8
Compression:
Stored size: 468 Bytes
Contents
class Cubism::Presence < ActionCable::Channel::Base def subscribed resource = GlobalID::Locator.locate_signed params[:signed_resource] if resource.present? stream_for resource resource.present_users.add(current_user.id) else reject end end def unsubscribed resource = GlobalID::Locator.locate_signed params[:signed_resource] return unless resource.present? resource.present_users.remove(current_user.id) end end
Version data entries
8 entries across 8 versions & 1 rubygems