From 6e73b208a9f69c68bf8575d902d6662eb3db0662 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 15 Mar 2014 10:23:48 +0200 Subject: [PATCH] Add comments fixtures for development --- db/fixtures/development/13_comments.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) create mode 100644 db/fixtures/development/13_comments.rb diff --git a/db/fixtures/development/13_comments.rb b/db/fixtures/development/13_comments.rb new file mode 100644 index 0000000..b133ec3 --- /dev/null +++ b/db/fixtures/development/13_comments.rb @@ -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 -- libgit2 0.21.2