associate clients with a campaign
git-svn-id: file:///home/svn/framework3/trunk@10601 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7f9fe3b527
commit
988bbd13f1
|
@ -0,0 +1,10 @@
|
|||
|
||||
class AddClientsToCampaigns < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :clients, :campaign_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :clients, :campaign_id
|
||||
end
|
||||
end
|
|
@ -5,6 +5,7 @@ class Campaign < ActiveRecord::Base
|
|||
has_one :email_template
|
||||
has_one :web_template
|
||||
has_many :email_addresses
|
||||
has_many :clients
|
||||
|
||||
extend SerializedPrefs
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ class DBManager
|
|||
class Client < ActiveRecord::Base
|
||||
include DBSave
|
||||
belongs_to :host
|
||||
belongs_to :campaign
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue