app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-0.18.0 vs app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-0.19.0

- old
+ new

@@ -95,11 +95,11 @@ set_custom_field_defaults(v) else set_index_field_defaults(v) end v.upstream_if = v.if unless v.if.nil? - v.if = :field_enabled? + v.if = :field_enabled? unless v.if == false v.normalize! config v.validate! end @@ -113,11 +113,11 @@ else set_show_field_defaults(v) end v.upstream_if = v.if unless v.if.nil? - v.if = :field_enabled? + v.if = :field_enabled? unless v.if == false v.normalize! config v.validate! end @@ -126,11 +126,11 @@ unless search_fields.blank? config.search_fields = Hash[config.search_fields.sort_by { |k, _v| field_weight(search_fields, k) }] config.search_fields.each do |k, v| v.upstream_if = v.if unless v.if.nil? - v.if = :field_enabled? + v.if = :field_enabled? unless v.if == false next if search_fields[k].blank? v.merge! search_fields[k].symbolize_keys v.normalize! config v.validate! @@ -140,11 +140,11 @@ unless sort_fields.blank? config.sort_fields = Hash[config.sort_fields.sort_by { |k, _v| field_weight(sort_fields, k) }] config.sort_fields.each do |k, v| v.upstream_if = v.if unless v.if.nil? - v.if = :field_enabled? + v.if = :field_enabled? unless v.if == false next if sort_fields[k].blank? v.merge! sort_fields[k].symbolize_keys v.normalize! config v.validate! @@ -159,11 +159,11 @@ next if facet_fields[k].blank? v.merge! facet_fields[k].symbolize_keys v.upstream_if = v.if unless v.if.nil? v.enabled = v.show - v.if = :field_enabled? + v.if = :field_enabled? unless v.if == false v.normalize! config v.validate! end end @@ -175,10 +175,10 @@ end config.view.each do |k, v| v.key = k v.upstream_if = v.if unless v.if.nil? - v.if = :enabled_in_spotlight_view_type_configuration? + v.if = :enabled_in_spotlight_view_type_configuration? unless v.if == false end unless document_index_view_types.blank? if config.search_fields.blank? config.navbar.partials[:saved_searches].if = false if config.navbar.partials.key? :saved_searches config.navbar.partials[:search_history].if = false if config.navbar.partials.key? :search_history