Class: Sufia::Forms::BatchEditForm
- Inherits:
-
WorkForm
- Object
- CurationConcerns::Forms::WorkForm
- WorkForm
- Sufia::Forms::BatchEditForm
- Defined in:
- app/forms/sufia/forms/batch_edit_form.rb
Instance Attribute Summary collapse
-
#batch_document_ids ⇒ Object
readonly
Returns the value of attribute batch_document_ids.
-
#names ⇒ Object
Returns the value of attribute names.
Attributes inherited from WorkForm
Class Method Summary collapse
-
.build_permitted_params ⇒ Object
Which parameters can we accept from the form.
Instance Method Summary collapse
-
#initialize(model, current_ability, batch_document_ids) ⇒ BatchEditForm
constructor
A new instance of BatchEditForm.
Methods inherited from WorkForm
#[], multiple?, #primary_terms, sanitize_params, #secondary_terms, #work_members
Constructor Details
#initialize(model, current_ability, batch_document_ids) ⇒ BatchEditForm
17 18 19 20 21 22 |
# File 'app/forms/sufia/forms/batch_edit_form.rb', line 17 def initialize(model, current_ability, batch_document_ids) super(model, current_ability) @names = [] @batch_document_ids = batch_document_ids initialize_combined_fields end |
Instance Attribute Details
#batch_document_ids ⇒ Object (readonly)
Returns the value of attribute batch_document_ids.
24 25 26 |
# File 'app/forms/sufia/forms/batch_edit_form.rb', line 24 def batch_document_ids @batch_document_ids end |
#names ⇒ Object
Returns the value of attribute names.
12 13 14 |
# File 'app/forms/sufia/forms/batch_edit_form.rb', line 12 def names @names end |
Class Method Details
.build_permitted_params ⇒ Object
Which parameters can we accept from the form
27 28 29 30 31 32 |
# File 'app/forms/sufia/forms/batch_edit_form.rb', line 27 def self.build_permitted_params super + [:visibility_during_embargo, :embargo_release_date, :visibility_after_embargo, :visibility_during_lease, :lease_expiration_date, :visibility_after_lease, :visibility] - [{ work_members_attributes: [:id, :_destroy] }] end |