class CurationConcerns::DataMigration::CollectionsMigration

Public Class Methods

run() click to toggle source
# File lib/curation_concerns/data_migration/collections_migration.rb, line 4
def self.run
  ::Collection.all.each do |collection|
    collection.members.each do |member|
      member.member_of_collections << collection
      member.save
    end
    collection.members = []
    collection.save
  end
end