Module: Informatics::Globals

Included in:
ApplicationHelper, Application, SearchesController, SessionsController, StudiesController
Defined in:
lib/informatics.rb,
lib/informatics/lib/informatics/globals.rb

Overview

rubocop:todo Style/Documentation

Constant Summary collapse

@@application =
nil
@@defaults =
nil

Instance Method Summary collapse

Instance Method Details

#applicationObject


7
8
9
# File 'lib/informatics.rb', line 7

def application
  @@application
end

#application=(app) ⇒ Object


11
12
13
# File 'lib/informatics.rb', line 11

def application=(app)
  @@application = app
end

#defaultsObject


15
16
17
# File 'lib/informatics.rb', line 15

def defaults
  @@defaults
end

#defaults=(incoming) ⇒ Object


19
20
21
# File 'lib/informatics.rb', line 19

def defaults=(incoming)
  @@defaults = incoming
end

#global_searchable_classesObject


23
24
25
# File 'lib/informatics.rb', line 23

def global_searchable_classes
  [Barcode, Project, Study, Sample, Labware, AssetGroup, Request, Supplier, Submission]
end

#search_optionsObject


27
28
29
# File 'lib/informatics.rb', line 27

def search_options
  global_searchable_classes.map { |klass| [klass.name] * 2 } << ['All', nil]
end