Class: Hyrax::Actors::AttachFilesActor
Instance Attribute Summary
#next_actor
Instance Method Summary
collapse
#initialize
Instance Method Details
#create(attributes) ⇒ Object
4
5
6
7
8
9
|
# File 'app/actors/hyrax/actors/attach_files_actor.rb', line 4
def create(attributes)
files = [attributes.delete(:files)].flatten.compact
file_sets = attach_files(files, visibility_attributes(attributes))
file_sets.all? { |fs| fs.is_a? ::FileSet } &&
next_actor.create(attributes) && send_create_notifications(file_sets)
end
|
#update(attributes) ⇒ Object
11
12
13
14
15
|
# File 'app/actors/hyrax/actors/attach_files_actor.rb', line 11
def update(attributes)
files = [attributes.delete(:files)].flatten.compact
next_actor.update(attributes) &&
attach_files(files, visibility_attributes(attributes))
end
|