From badf0cfd9e2b4d98f32507298791295aecc6a1b7 Mon Sep 17 00:00:00 2001 From: Jamie Little Date: Thu, 15 Aug 2019 12:28:51 -0500 Subject: [PATCH] Fix for Collection visibility not saving The `visibility` property needs to be present in the `Form` class. --- app/forms/hyrax/forms/collection_form.rb | 2 +- spec/forms/hyrax/forms/collection_form_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/forms/hyrax/forms/collection_form.rb b/app/forms/hyrax/forms/collection_form.rb index 103bb662..5cc5c56d 100644 --- a/app/forms/hyrax/forms/collection_form.rb +++ b/app/forms/hyrax/forms/collection_form.rb @@ -27,7 +27,7 @@ class CollectionForm :subject_names, :subject_geo, :subject_time_periods, :note, :rights_documentation, :sensitive_material, :internal_rights_note, :contact_information, :staff_note, :system_of_record_ID, :legacy_ark, - :primary_repository_ID] + :primary_repository_ID, :visibility] self.required_fields = [:title, :holding_repository, :creator, :abstract, :primary_repository_ID] diff --git a/spec/forms/hyrax/forms/collection_form_spec.rb b/spec/forms/hyrax/forms/collection_form_spec.rb index e5144fc1..3854f72b 100644 --- a/spec/forms/hyrax/forms/collection_form_spec.rb +++ b/spec/forms/hyrax/forms/collection_form_spec.rb @@ -12,7 +12,7 @@ :subject_names, :subject_geo, :subject_time_periods, :note, :rights_documentation, :sensitive_material, :internal_rights_note, :contact_information, :staff_note, :system_of_record_ID, :legacy_ark, - :primary_repository_ID] + :primary_repository_ID, :visibility] end end @@ -92,7 +92,7 @@ :abstract, :primary_language, :finding_aid_link, :institution, :local_call_number, { keywords: [] }, { subject_topics: [] }, { subject_names: [] }, { subject_geo: [] }, { subject_time_periods: [] }, { note: [] }, :rights_documentation, :sensitive_material, :internal_rights_note, :contact_information, - { staff_note: [] }, :system_of_record_ID, { legacy_ark: [] }, :primary_repository_ID, + { staff_note: [] }, :system_of_record_ID, { legacy_ark: [] }, :primary_repository_ID, :visibility, { permissions_attributes: [:type, :name, :access, :id, :_destroy] }] end end