Skip to content
Snippets Groups Projects
Commit b4544549 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

migration locked to university

parent a40a638d
No related branches found
No related tags found
No related merge requests found
# ContentMigration.new(university).migrate_all
class ContentMigration
def self.run
ContentMigration.new.migrate_all
def initialize(university)
@university = university
end
def migrate_all
......@@ -46,7 +47,7 @@ class ContentMigration
def migrate_objects(about_type)
about_ids(about_type).each do |about_id|
object = about_type.constantize.find(about_id)
migrate(object)
migrate(object) if object.university == @university
end
end
......
......@@ -8,7 +8,7 @@ namespace :app do
desc 'Fix things'
task fix: :environment do
ContentMigration.run
end
namespace :websites do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment