Sha256: 041be0126953175e66b77537bfc30ba3477e8cd909e191a370333a377869796c
Contents?: true
Size: 690 Bytes
Versions: 15
Compression:
Stored size: 690 Bytes
Contents
module Symphonia module ActionCable module Connection extend ActiveSupport::Concern included do identified_by :current_user def connect self.current_user = find_verified_user_or_guest logger.add_tags 'ActionCable', self.current_user.login unless self.current_user.nil? end protected def find_verified_user_or_guest if (credentials = request.cookie_jar['symphonia/user_credentials']).present? ::Symphonia::User.find_by_persistence_token(credentials.split(':')[0]) else nil end end end module ClassMethods end end end end
Version data entries
15 entries across 15 versions & 1 rubygems