From 8921b6464a1e48f7d9c4f868de52cefb38f6604a Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Sun, 24 May 2015 16:11:55 +0300 Subject: [PATCH] Create CFP records for existing Conference records --- ...0524160616_create_call_for_participation_records.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 db/migrate/20150524160616_create_call_for_participation_records.rb diff --git a/db/migrate/20150524160616_create_call_for_participation_records.rb b/db/migrate/20150524160616_create_call_for_participation_records.rb new file mode 100644 index 0000000..2788672 --- /dev/null +++ b/db/migrate/20150524160616_create_call_for_participation_records.rb @@ -0,0 +1,10 @@ +class Conference < ActiveRecord::Base; end +class CallForParticipation < ActiveRecord::Base; end + +class CreateCallForParticipationRecords < ActiveRecord::Migration + def change + Conference.all.each do |c| + CallForParticipation.create!(conference_id: c.id) + end + end +end