You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
347 B
15 lines
347 B
5 years ago
|
module LaboratoryHelper
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
included do
|
||
|
helper_method :default_setting
|
||
|
end
|
||
|
|
||
|
def current_laboratory
|
||
|
@_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1))
|
||
|
end
|
||
|
|
||
|
def default_setting
|
||
|
@_default_setting ||= LaboratorySetting.find_by(laboratory_id: 1)
|
||
|
end
|
||
|
end
|