parent
ff98ef9463
commit
e7c04e8c58
@ -0,0 +1 @@
|
||||
$("#subject_members").html("<%= j(render :partial => 'subject_members') %>");
|
@ -0,0 +1 @@
|
||||
$("#subject_members").html("<%= j(render :partial => 'subject_members') %>");
|
@ -0,0 +1,11 @@
|
||||
class AddPositionToSubjectMembers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :subject_members, :position, :integer, :default => 1
|
||||
|
||||
Subject.all.each do |subject|
|
||||
subject.subject_members.reorder("id asc").each_with_index do |member, index|
|
||||
member.update_column('position', index + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue