Class: Setting

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/setting.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) location_metric



25
26
27
28
29
30
# File 'app/models/setting.rb', line 25

def self.location_metric
  @location_metric ||= where({
    :name => 'Team and Data Location Metric',
    :value_object_type => 'Metric'
  }).first.try(:value_object)
end

+ (Object) partner_logos



40
41
42
43
44
45
46
# File 'app/models/setting.rb', line 40

def self.partner_logos
  @partner_logos ||= where({
    :name => 'Partner Logos'
  }).first.try(:value_data)
  @partner_logos = [] if @partner_logos.blank?
  @partner_logos
end

+ (Object) site_title



32
33
34
35
36
37
38
# File 'app/models/setting.rb', line 32

def self.site_title
  @site_title ||= where({
    :name => 'Site Title'
  }).first.try(:value_data)
  @site_title = 'Center for Aggregated Data & Reporting' if @site_title.blank?
  @site_title
end