module FayeShard::User::Faye
Module which is designed to be included to User
model. It provides helper method to get token and method to push data to user’s shard.
Public Instance Methods
faye_channel()
click to toggle source
Returns channel for a user, which is basically /ID
# File lib/faye_shard/user/faye.rb, line 12 def faye_channel "/#{self.id}" end
faye_shard()
click to toggle source
Returns shard for this user
# File lib/faye_shard/user/faye.rb, line 27 def faye_shard FayeShards.shard(self.id) end