diff options
Diffstat (limited to 'db/fixtures/development/13_comments.rb')
-rw-r--r-- | db/fixtures/development/13_comments.rb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/db/fixtures/development/13_comments.rb b/db/fixtures/development/13_comments.rb index b133ec3146d..626aba200d1 100644 --- a/db/fixtures/development/13_comments.rb +++ b/db/fixtures/development/13_comments.rb @@ -1,13 +1,19 @@ -ActiveRecord::Base.observers.disable :all +Gitlab::Seeder.quiet do + Issue.all.limit(10).each_with_index do |issue, i| + 5.times do + user = issue.project.team.users.sample -Issue.all.limit(10).each_with_index do |issue, i| - 5.times do - Note.seed(:id, [{ - project_id: issue.project.id, - author_id: issue.project.team.users.sample.id, - note: Faker::Lorem.sentence, - noteable_id: issue.id, - noteable_type: 'Issue' - }]) + 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 |