Sha256: 27b390c4fe5b44ae8d93a2af5686579a51477d394c8ea34931dbdb7c62eb1361
Contents?: true
Size: 485 Bytes
Versions: 25
Compression:
Stored size: 485 Bytes
Contents
module ApplicationCable class Connection < ActionCable::Connection::Base identified_by :loco_permissions def connect self.loco_permissions = [SecureRandom.uuid, current_user, current_admin] logger.add_tags 'AC', loco_permissions.map{ |e| e.try(:id) || '-' } end protected def current_admin Admin.find_by id: cookies.signed[:admin_id] end def current_user User.find_by id: cookies.signed[:user_id] end end end
Version data entries
25 entries across 25 versions & 1 rubygems