Table of Contents |
---|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
This tutorial assumes that you generated a work type name GenericWork. If you used a different name, substitute that name for all occurrences of GenericWork and generic_work. |
...
Code Block |
---|
# services/departments_service.rb module DepartmentsService mattr_accessor :authority self.authority = Qa::Authorities::Local.subauthority_for('departments') def self.select_all_options authority.all.map do |element| [element[:label], element[:id]] end end def self.label(id) authority.find(id).fetch('term') end end |
\uD83D\uDCCB Related articles
...