Class: Hyrax::CreateWithRemoteFilesActor
- Inherits:
-
Actors::AbstractActor
- Object
- Actors::AbstractActor
- Hyrax::CreateWithRemoteFilesActor
- Defined in:
- app/actors/hyrax/create_with_remote_files_actor.rb
Overview
Attaches remote files to the work
Instance Attribute Summary
Attributes inherited from Actors::AbstractActor
Instance Method Summary collapse
Methods inherited from Actors::AbstractActor
Constructor Details
This class inherits a constructor from Hyrax::Actors::AbstractActor
Instance Method Details
#create(attributes) ⇒ Object
4 5 6 7 |
# File 'app/actors/hyrax/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/hyrax/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 |