39f80884db
Return execution of observers in seeds. Mute email sending to letter opening in you browser. Added `rake dev` task to reset db and add seeds. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
19 lines
435 B
Ruby
19 lines
435 B
Ruby
Gitlab::Seeder.quiet do
|
|
Issue.all.limit(10).each_with_index do |issue, i|
|
|
5.times do
|
|
user = issue.project.team.users.sample
|
|
|
|
Gitlab::Seeder.by_user(user) do
|
|
Note.seed(:id, [{
|
|
project_id: issue.project.id,
|
|
author_id: user.id,
|
|
note: Faker::Lorem.sentence,
|
|
noteable_id: issue.id,
|
|
noteable_type: 'Issue'
|
|
}])
|
|
|
|
print '.'
|
|
end
|
|
end
|
|
end
|
|
end
|