Welcome to mirror list, hosted at ThFree Co, Russian Federation.

13_comments.rb « development « fixtures « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b133ec3146de681b589962d75e292521a0ea9718 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
ActiveRecord::Base.observers.disable :all

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'
    }])
  end
end