Module: Informatics::Globals

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

Constant Summary collapse

@@application =
nil
@@defaults =
nil

Instance Method Summary collapse

Instance Method Details

#applicationObject


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

def application
  @@application
end

#application=(app) ⇒ Object


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

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

#defaultsObject


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

def defaults
  @@defaults
end

#defaults=(incoming) ⇒ Object


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

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

#global_searchable_classesObject


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

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

#search_optionsObject


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

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