Module: DatasetInitialization
- Extended by:
- ActiveSupport::Concern
- Included in:
- Concepts::AlphabeticalController, ConceptsController, ConceptsMovementController, RemoteLabelsController, SearchResultsController
- Defined in:
- app/controllers/concerns/dataset_initialization.rb
Instance Method Summary collapse
Instance Method Details
#datasets_as_json ⇒ Object
11 12 13 14 15 16 |
# File 'app/controllers/concerns/dataset_initialization.rb', line 11 def datasets_as_json init_datasets.inject({}) do |memo, dataset| memo[dataset.url.to_s] = dataset.name memo end.to_json end |
#init_datasets ⇒ Object
4 5 6 7 8 9 |
# File 'app/controllers/concerns/dataset_initialization.rb', line 4 def init_datasets datasets = Iqvoc.config['sources.iqvoc'].reject { |s| s.blank? } datasets.map do |url| Dataset::IqvocDataset.new(url) end end |