app/models/spotlight/site.rb in blacklight-spotlight-0.34.1 vs app/models/spotlight/site.rb in blacklight-spotlight-1.0.0.alpha1
- old
+ new
@@ -3,10 +3,10 @@
# Global spotlight configuration
class Site < ActiveRecord::Base
has_many :exhibits, -> { ordered_by_weight }
has_many :roles, as: :resource
- belongs_to :masthead, dependent: :destroy
+ belongs_to :masthead, dependent: :destroy, optional: true
accepts_nested_attributes_for :masthead, update_only: true
accepts_nested_attributes_for :exhibits
def self.instance