Class: Hyrax::Forms::WorkEmbargoForm
- Defined in:
- app/forms/hyrax/forms/work_embargo_form.rb
Overview
Note:
this supports the edit functionality of EmbargoesControllerBehavior
.
Represents an embargo for edit through a work. That is, this form can be used to wrap a Work in order to capture state changes related only to its embargo, ignoring the work’s other fields.
Instance Method Summary collapse
Methods inherited from ChangeSet
Instance Method Details
#embargo_populator ⇒ Object
19 20 21 |
# File 'app/forms/hyrax/forms/work_embargo_form.rb', line 19 def (**) self. = Hyrax::EmbargoManager.(resource: model) end |
#human_readable_type ⇒ String
25 26 27 |
# File 'app/forms/hyrax/forms/work_embargo_form.rb', line 25 def human_readable_type model.to_model.human_readable_type end |
#model_name ⇒ ActiveModel::Name
31 32 33 |
# File 'app/forms/hyrax/forms/work_embargo_form.rb', line 31 def model_name model.to_model.model_name end |