Module: Informatics::Globals
- Included in:
- ControllerHelper, 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
- #application ⇒ Object
- #application=(app) ⇒ Object
- #defaults ⇒ Object
- #defaults=(incoming) ⇒ Object
- #global_searchable_classes ⇒ Object
- #search_options ⇒ Object
Instance Method Details
#application ⇒ Object
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 |
#defaults ⇒ Object
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_classes ⇒ Object
23 24 25 |
# File 'lib/informatics.rb', line 23 def global_searchable_classes [Barcode, Project, Study, Sample, Labware, AssetGroup, Request, Supplier, Submission] end |
#search_options ⇒ Object
27 28 29 |
# File 'lib/informatics.rb', line 27 def global_searchable_classes.map { |klass| [klass.name] * 2 } << ['All', nil] end |