19 lines
570 B
Ruby
19 lines
570 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
|
|
validates :description, presence: true
|
|
validates :productsandservices, presence: true
|
|
|
|
after_create :send_to_better_video
|
|
def send_to_better_video
|
|
#TODO Make API Calls
|
|
end
|
|
|
|
|
|
end
|