Class: Spree::Tracker

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

Class Method Summary collapse

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