Class: Spotlight::Analytics::GaModel

Inherits:
Object
  • Object
show all
Extended by:
Legato::Model
Defined in:
app/models/spotlight/analytics/ga_model.rb

Overview

Google Analytics data model for the Exhibit dashboard

Class Method Summary collapse

Class Method Details

.context(exhibit) ⇒ Object



14
15
16
17
18
19
20
# File 'app/models/spotlight/analytics/ga_model.rb', line 14

def self.context(exhibit)
  if exhibit.is_a? Spotlight::Exhibit
    for_exhibit(exhibit)
  else
    path(exhibit)
  end
end

.for_exhibit(exhibit) ⇒ Object



22
23
24
# File 'app/models/spotlight/analytics/ga_model.rb', line 22

def self.for_exhibit(exhibit)
  path(Spotlight::Engine.routes.url_helpers.exhibit_path(exhibit))
end