Class: MoveAllWorksToAdminSet

Inherits:
Object
  • Object
show all
Defined in:
lib/hyrax/move_all_works_to_admin_set.rb

Overview

If you want to move all your works to an admin set run this.

Class Method Summary collapse

Class Method Details

.run(admin_set) ⇒ Object



4
5
6
7
8
# File 'lib/hyrax/move_all_works_to_admin_set.rb', line 4

def self.run(admin_set)
  Hyrax::WorkRelation.new.find_each do |w|
    w.update(admin_set: admin_set)
  end
end