Add comments fixtures for development

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-03-15 10:23:48 +02:00
parent ecae936d34
commit 6e73b208a9
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,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