blob: 6b34939b5ea0e8d757aeaaf06ce5b8e909c65f8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
namespace :db do
task populate: :environment do
Video.destroy_all
user = User.create!(email: Faker::Internet.email, password: 'password', password_confirmation: 'password')
puts user.email
20.times do
user.videos.create(
title: Faker::Name.name,
description: Faker::Lorem.words(50).join(' '),
uri: Faker::Internet.uri('https')
)
end
end
end
|