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/20150930011457_alter_user_a...

19 lines
451 B

class AlterUserActivitiesNews < ActiveRecord::Migration
def up
UserActivity.all.each do |activity|
if activity.act_type = 'News'
if activity.act
activity.created_at = activity.act.created_on
activity.updated_at = activity.act.updated_on ? activity.act.updated_on : activity.act.created_on
activity.save
else
activity.destroy
end
end
end
end
def down
end
end