Class: Atrium::BrowseLevel

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
QueryParamMixin
Defined in:
app/models/atrium/browse_level.rb

Overview

Maps to a facet, when rendered it renders a collection of solr documents. Each solr document rendered this way, may have a unique showcase associated with it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selectedObject

Returns the value of attribute selected.



25
26
27
# File 'app/models/atrium/browse_level.rb', line 25

def selected
  @selected
end

#valuesObject



28
29
30
# File 'app/models/atrium/browse_level.rb', line 28

def values
  @values ||= []
end

Instance Method Details

#labelObject



37
38
39
40
41
42
43
# File 'app/models/atrium/browse_level.rb', line 37

def label
  if read_attribute(:label).present?
    read_attribute(:label)
  else
    Atrium.config.label_for_facet(solr_facet_name)
  end
end

#to_sObject



32
33
34
# File 'app/models/atrium/browse_level.rb', line 32

def to_s
  "#{solr_facet_name}"
end