2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2021-02-20 09:57:27 -08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: commercials
|
|
|
|
|
#
|
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
|
# commercial_type :string
|
|
|
|
|
# commercialable_type :string
|
|
|
|
|
# url :string
|
|
|
|
|
# created_at :datetime
|
|
|
|
|
# updated_at :datetime
|
|
|
|
|
# commercial_id :string
|
|
|
|
|
# commercialable_id :integer
|
|
|
|
|
#
|
2014-08-12 11:51:59 +03:00
|
|
|
|
2018-09-03 20:44:39 +02:00
|
|
|
FactoryBot.define do
|
2014-08-12 11:51:59 +03:00
|
|
|
factory :commercial do
|
2017-12-12 11:49:20 +01:00
|
|
|
sequence(:url) { |n| "https://www.youtube.com/watch?v=4VrhlyIgo3M&factory=#{n}" }
|
2015-04-14 17:33:59 +02:00
|
|
|
|
|
|
|
|
factory :conference_commercial do
|
|
|
|
|
association :commercialable, factory: :conference
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
factory :event_commercial do
|
|
|
|
|
association :commercialable, factory: :event
|
|
|
|
|
end
|
2014-08-12 11:51:59 +03:00
|
|
|
end
|
|
|
|
|
end
|