Fix not_in_project scope. Added counters in admin -> users. Improved seeds
This commit is contained in:
parent
e56a47ab19
commit
4cbb29cfad
13 changed files with 103 additions and 57 deletions
|
@ -1,16 +1,18 @@
|
|||
Gitlab::Seeder.quiet do
|
||||
(1..300).each do |i|
|
||||
# Random Project
|
||||
project_id = rand(2) + 1
|
||||
project = Project.find(project_id)
|
||||
project = Project.all.sample
|
||||
|
||||
# Random user
|
||||
user = project.users.sample
|
||||
|
||||
next unless user
|
||||
|
||||
user_id = user.id
|
||||
|
||||
Note.seed(:id, [{
|
||||
id: i,
|
||||
project_id: project_id,
|
||||
project_id: project.id,
|
||||
author_id: user_id,
|
||||
note: Faker::Lorem.sentence(6)
|
||||
}])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue