Class: Hyrax::Forms::BatchEditForm
- Defined in:
- app/forms/hyrax/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
#agreement_accepted, #current_ability
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
#[], #collections_for_select, #initialize_field, #primary_terms, sanitize_params, #secondary_terms, #select_files, #version, #work_members
Constructor Details
#initialize(model, current_ability, batch_document_ids) ⇒ BatchEditForm
Returns a new instance of BatchEditForm.
19 20 21 22 23 24 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 19 def initialize(model, current_ability, batch_document_ids) super(model, current_ability, nil) @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.
26 27 28 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 26 def batch_document_ids @batch_document_ids end |
#names ⇒ Object
Returns the value of attribute names.
12 13 14 |
# File 'app/forms/hyrax/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
29 30 31 32 33 34 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 29 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 |