You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/db/migrate/20151013091057_update_princ...

16 lines
431 B

class UpdatePrincipalActivity < ActiveRecord::Migration
def up
User.all.each do |user|
transaction do
user.principal_acts << PrincipalActivity.new(:user_id => user.id,:principal_id => user.id)
user.journals_for_messages.each do |jour|
jour.principal_acts << PrincipalActivity.new(:user_id => jour.user_id,:principal_id => user.id)
end
end
end
end
def down
end
end