vidpush/app/models/videolisting.rb

13 lines
361 B
Ruby

class Videolisting < ActiveRecord::Base
belongs_to :campaign
validates :videocode, presence: true, uniqueness: true
validates :producttypeid, presence: true
validates :voiceoverselection, presence: true
validates :musicselection, presence: true
def asseturls_array
self.asseturls.split(',').collect { |url| { asseturl: url.strip } }
end
end