Class: GalterIrExporter::Migration::Survey::Surveyor
- Inherits:
-
Object
- Object
- GalterIrExporter::Migration::Survey::Surveyor
- Defined in:
- lib/galter_ir_exporter/migration/survey/surveyor.rb
Class Method Summary collapse
-
.call(id_list) ⇒ Object
call causes the surveyor to create a survey item for each id in the list.
Class Method Details
.call(id_list) ⇒ Object
call causes the surveyor to create a survey item for each id in the list
10 11 12 13 14 15 16 |
# File 'lib/galter_ir_exporter/migration/survey/surveyor.rb', line 10 def call(id_list) ActiveFedora::Base.find(id_list).each do |object| Item.find_or_create_by(object_id: object.id) do |item| item.assign_attributes(object_class: object.class, object_title: object.title, migration_status: :initial_state) end end end |