17 lines
480 B
Ruby
17 lines
480 B
Ruby
class Campaign < ActiveRecord::Base
|
|
has_many :videolistings, :dependent => :delete_all
|
|
accepts_nested_attributes_for :videolistings
|
|
validates :clientid, presence: true, uniqueness: true
|
|
validates :billingcode, uniqueness: true
|
|
validates :listingcode, presence: true, uniqueness: true
|
|
validates :advertisername, presence: true
|
|
validates :websiteurl, presence: true
|
|
|
|
after_create :send_to_better_video
|
|
def send_to_better_video
|
|
#TODO Make API Calls
|
|
end
|
|
|
|
|
|
end
|