Class: CurationConcerns::LicenseService
- Inherits:
-
QaSelectService
- Object
- QaSelectService
- CurationConcerns::LicenseService
- Defined in:
- app/services/curation_concerns/license_service.rb
Overview
Provide select options for the license (dcterms:rights) field
Instance Attribute Summary
Attributes inherited from QaSelectService
Instance Method Summary collapse
- #include_current_value(value, _index, render_options, html_options) ⇒ Object
-
#initialize ⇒ LicenseService
constructor
A new instance of LicenseService.
Methods inherited from QaSelectService
#active?, #active_elements, #label, #select_active_options, #select_all_options
Constructor Details
#initialize ⇒ LicenseService
Returns a new instance of LicenseService.
4 5 6 |
# File 'app/services/curation_concerns/license_service.rb', line 4 def initialize super('licenses') end |
Instance Method Details
#include_current_value(value, _index, render_options, html_options) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/services/curation_concerns/license_service.rb', line 8 def include_current_value(value, _index, , ) unless value.blank? || active?(value) [:class] << ' force-select' += [[label(value), value]] end [, ] end |