Module: ResourceTypesService
- Defined in:
- app/services/resource_types_service.rb
Class Method Summary collapse
Class Method Details
.label(id) ⇒ Object
11 12 13 |
# File 'app/services/resource_types_service.rb', line 11 def self.label(id) .find(id).fetch('term') end |
.microdata_type(id) ⇒ Object
16 17 18 19 |
# File 'app/services/resource_types_service.rb', line 16 def self.microdata_type(id) I18n.t("curation_concerns.schema_org.resource_type.#{id}", default: CurationConcerns.config.microdata_default_type) end |
.select_options ⇒ Object
5 6 7 8 9 |
# File 'app/services/resource_types_service.rb', line 5 def self. .all.map do |element| [element[:label], element[:id]] end end |