Class: Spree::Tracker

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree/tracker.rb

Class Method Summary collapse

Methods inherited from Base

page

Methods included from Preferences::Preferable

#clear_preferences, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Class Method Details

.currentObject


3
4
5
6
# File 'app/models/spree/tracker.rb', line 3

def self.current
  tracker = where(active: true, environment: Rails.env).first
  tracker.analytics_id.present? ? tracker : nil if tracker
end