Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/epom_rails/acts_as_advertiser.rb,
lib/epom_rails/acts_as_placement.rb,
lib/epom_rails/acts_as_campaign.rb,
lib/epom_rails/acts_as_analytic.rb,
lib/epom_rails/acts_as_banner.rb,
lib/epom_rails/acts_as_zone.rb,
lib/epom_rails/acts_as_site.rb,
lib/epom_rails/acts_as.rb

Class Method Summary collapse

Class Method Details

.acts_as_advertiser(params = {}) ⇒ Object



3
4
5
6
# File 'lib/epom_rails/acts_as_advertiser.rb', line 3

def self.acts_as_advertiser(params = {})
  EpomRails.config.advertiser[:model] = self
  acts_as(Epom::Advertiser, params)
end

.acts_as_analytic(params = {}) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/epom_rails/acts_as_analytic.rb', line 2

def self.acts_as_analytic(params = {})
	EpomRails.config.analytic[:model] = self

   extend EpomRails   
   override_config(Epom::Analytic, params)

   define_analytic_from_epom
end

.acts_as_banner(params = {}) ⇒ Object



3
4
5
6
# File 'lib/epom_rails/acts_as_banner.rb', line 3

def self.acts_as_banner(params = {})
	EpomRails.config.banner[:model] = self
  acts_as(Epom::Banner, params)
end

.acts_as_campaign(params = {}) ⇒ Object



3
4
5
6
# File 'lib/epom_rails/acts_as_campaign.rb', line 3

def self.acts_as_campaign(params = {})
	EpomRails.config.campaign[:model] = self
  acts_as(Epom::Campaign, params)
end

.acts_as_placement(params = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/epom_rails/acts_as_placement.rb', line 3

def self.acts_as_placement(params = {})
	EpomRails.config.placement[:model] = self
  acts_as(Epom::Placement, params)

  define_key_method
end

.acts_as_site(params = {}) ⇒ Object



3
4
5
6
# File 'lib/epom_rails/acts_as_site.rb', line 3

def self.acts_as_site(params = {})
	EpomRails.config.site[:model] = self
  acts_as(Epom::Site, params)
end

.acts_as_zone(params = {}) ⇒ Object



3
4
5
6
# File 'lib/epom_rails/acts_as_zone.rb', line 3

def self.acts_as_zone(params = {})
	EpomRails.config.zone[:model] = self
  acts_as(Epom::Zone, params)
end