Class: CurationConcerns::Actors::AddToWorkActor
Overview
Instance Attribute Summary
#next_actor
Instance Method Summary
collapse
#initialize
Instance Method Details
#create(attributes) ⇒ Object
4
5
6
7
|
# File 'app/actors/curation_concerns/actors/add_to_work_actor.rb', line 4
def create(attributes)
work_ids = attributes.delete(:in_works_ids)
next_actor.create(attributes) && add_to_works(work_ids)
end
|
#update(attributes) ⇒ Object
9
10
11
12
|
# File 'app/actors/curation_concerns/actors/add_to_work_actor.rb', line 9
def update(attributes)
work_ids = attributes.delete(:in_works_ids)
add_to_works(work_ids) && next_actor.update(attributes)
end
|