vidpush/app/models/campaign.rb

10 lines
382 B
Ruby
Raw Normal View History

2014-04-07 18:41:34 +00:00
class Campaign < ActiveRecord::Base
has_many :videolistings, :dependent => :delete_all
2014-04-07 18:41:34 +00:00
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
2014-04-07 18:41:34 +00:00
end