Sha256: 5075fa63571c379f632f27a3cc742d194d3f304261d57ff11563f18bc4ba58ba

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

module Caboose
  class RetargetingConfig < ActiveRecord::Base
    self.table_name = "retargeting_configs"

    belongs_to :site
    attr_accessible :id,
      :site_id,
      :conversion_id,      
      :labels_function,
      :fb_pixel_id
    
    def labels(request, page)
      return [] if self.labels_function.nil? || self.labels_function.strip.length == 0      
      return [self.labels_function] if self.labels_function.starts_with?('_')        
      arr = eval(self.labels_function)      
      return [] if arr.nil?
      return [arr] if arr is_a? String
      return arr        
    end        
    
  end  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caboose-cms-0.5.197 app/models/caboose/retargeting_config.rb