|
|
|
@ -38,12 +38,20 @@ class Laboratory < ApplicationRecord
|
|
|
|
|
find_by_identifier(subdomain)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.current=(laboratory)
|
|
|
|
|
Thread.current[:current_laboratory] = laboratory
|
|
|
|
|
# def self.current=(laboratory)
|
|
|
|
|
# Thread.current[:current_laboratory] = laboratory
|
|
|
|
|
# end
|
|
|
|
|
#
|
|
|
|
|
# def self.current
|
|
|
|
|
# Thread.current[:current_laboratory] ||= Laboratory.find(1)
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
def self.current=(user)
|
|
|
|
|
RequestStore.store[:current_laboratory] = user
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.current
|
|
|
|
|
Thread.current[:current_laboratory] ||= Laboratory.find(1)
|
|
|
|
|
RequestStore.store[:current_laboratory] ||= User.anonymous
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def shixuns
|
|
|
|
|