Class: Spotlight::CustomSearchField

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/spotlight/custom_search_field.rb

Overview

Exhibit-specific custom search fields

Instance Method Summary collapse

Instance Method Details

#labelObject



15
16
17
18
19
20
21
22
# File 'app/models/spotlight/custom_search_field.rb', line 15

def label
  conf = if slug && blacklight_configuration && blacklight_configuration.search_fields.key?(slug)
           blacklight_configuration.search_fields[slug].reverse_merge(configuration)
         else
           configuration
         end
  conf['label']
end

#label=(label) ⇒ Object



9
10
11
12
13
# File 'app/models/spotlight/custom_search_field.rb', line 9

def label=(label)
  configuration['label'] = label

  update_blacklight_configuration_label label
end