|
class AddSyllabusMembers < ActiveRecord::Migration
|
|
def up
|
|
Syllabus.all.each do |syllabus|
|
|
if syllabus.syllabus_members.empty?
|
|
member = SyllabusMember.create(:user_id => syllabus.user_id, :rank => 1)
|
|
syllabus.syllabus_members << member
|
|
end
|
|
end
|
|
end
|
|
|
|
def down
|
|
end
|
|
end
|