Class: Hyrax::AdminSetOptionsPresenter
- Inherits:
-
Object
- Object
- Hyrax::AdminSetOptionsPresenter
- Defined in:
- app/presenters/hyrax/admin_set_options_presenter.rb
Overview
Presents the options for the AdminSet widget on the create/edit form
Instance Method Summary collapse
-
#initialize(service) ⇒ AdminSetOptionsPresenter
constructor
A new instance of AdminSetOptionsPresenter.
-
#select_options(access = :deposit) ⇒ Object
Return AdminSet selectbox options based on access type.
Constructor Details
#initialize(service) ⇒ AdminSetOptionsPresenter
Returns a new instance of AdminSetOptionsPresenter.
4 5 6 |
# File 'app/presenters/hyrax/admin_set_options_presenter.rb', line 4 def initialize(service) @service = service end |
Instance Method Details
#select_options(access = :deposit) ⇒ Object
Return AdminSet selectbox options based on access type
10 11 12 13 14 |
# File 'app/presenters/hyrax/admin_set_options_presenter.rb', line 10 def (access = :deposit) @service.search_results(access).map do |admin_set| [admin_set.to_s, admin_set.id, data_attributes(admin_set)] end end |