Class: CurationConcerns::Actors::AddAsMemberOfCollectionsActor
- Inherits:
-
AbstractActor
- Object
- AbstractActor
- CurationConcerns::Actors::AddAsMemberOfCollectionsActor
show all
- Defined in:
- app/actors/curation_concerns/actors/add_as_member_of_collections_actor.rb
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_as_member_of_collections_actor.rb', line 4
def create(attributes)
collection_ids = attributes.delete(:member_of_collection_ids)
add_to_collections(collection_ids) && next_actor.create(attributes)
end
|
#update(attributes) ⇒ Object
9
10
11
12
|
# File 'app/actors/curation_concerns/actors/add_as_member_of_collections_actor.rb', line 9
def update(attributes)
collection_ids = attributes.delete(:member_of_collection_ids)
add_to_collections(collection_ids) && next_actor.update(attributes)
end
|