Sha256: 8517cbb823ac8f28bb84dc64600315c3532209ee783ee1f785a000e22e6d7815
Contents?: true
Size: 498 Bytes
Versions: 29
Compression:
Stored size: 498 Bytes
Contents
identified_by :loco_permissions def connect # loco_permissions should be the same as in application_controller.rb # + SecureRandom.uuid is mandatory at 1st position self.loco_permissions = [SecureRandom.uuid, current_user, current_admin] end protected def current_admin defined?(Admin) && Admin.find_by(id: cookies.signed[:admin_id]) end def current_user defined?(User) && User.find_by(id: cookies.signed[:user_id]) end
Version data entries
29 entries across 29 versions & 1 rubygems