Class: Sufia::CreateWithRemoteFilesActor

Inherits:
CurationConcerns::Actors::AbstractActor
  • Object
show all
Defined in:
app/actors/sufia/create_with_remote_files_actor.rb

Overview

Attaches remote files to the work

Instance Method Summary collapse

Instance Method Details

#create(attributes) ⇒ Object



4
5
6
7
# File 'app/actors/sufia/create_with_remote_files_actor.rb', line 4

def create(attributes)
  remote_files = attributes.delete(:remote_files)
  next_actor.create(attributes) && attach_files(remote_files)
end

#update(attributes) ⇒ Object



9
10
11
12
# File 'app/actors/sufia/create_with_remote_files_actor.rb', line 9

def update(attributes)
  remote_files = attributes.delete(:remote_files)
  next_actor.update(attributes) && attach_files(remote_files)
end