app/models/spotlight/exhibit.rb in blacklight-spotlight-0.34.1 vs app/models/spotlight/exhibit.rb in blacklight-spotlight-1.0.0.alpha1
- old
+ new
@@ -43,12 +43,12 @@
has_many :filters, dependent: :delete_all
has_one :blacklight_configuration, class_name: 'Spotlight::BlacklightConfiguration', dependent: :delete
has_one :home_page
- belongs_to :site
- belongs_to :masthead, dependent: :destroy
- belongs_to :thumbnail, class_name: 'Spotlight::ExhibitThumbnail', dependent: :destroy
+ belongs_to :site, optional: true
+ belongs_to :masthead, dependent: :destroy, optional: true
+ belongs_to :thumbnail, class_name: 'Spotlight::ExhibitThumbnail', dependent: :destroy, optional: true
accepts_nested_attributes_for :about_pages, :attachments, :contacts, :custom_fields, :feature_pages,
:main_navigations, :owned_taggings, :resources, :searches, :solr_document_sidecars
accepts_nested_attributes_for :blacklight_configuration, :home_page, :filters, update_only: true
accepts_nested_attributes_for :masthead, :thumbnail, update_only: true, reject_if: proc { |attr| attr['iiif_tilesource'].blank? }