Class: Hyrax::Actors::CollectionsMembershipActor
- Inherits:
-
AbstractActor
- Object
- AbstractActor
- Hyrax::Actors::CollectionsMembershipActor
- Defined in:
- app/actors/hyrax/actors/collections_membership_actor.rb
Overview
Adds membership to and removes membership from collections. This decodes parameters that follow the rails nested parameters conventions:
Instance Attribute Summary
Attributes inherited from AbstractActor
Instance Method Summary collapse
-
#create(env) ⇒ Boolean
True if create was successful.
-
#update(env) ⇒ Boolean
True if update was successful.
Methods inherited from AbstractActor
Constructor Details
This class inherits a constructor from Hyrax::Actors::AbstractActor
Instance Method Details
#create(env) ⇒ Boolean
Returns true if create was successful.
16 17 18 19 |
# File 'app/actors/hyrax/actors/collections_membership_actor.rb', line 16 def create(env) extract_collection_id(env) assign_nested_attributes_for_collection(env) && next_actor.create(env) end |
#update(env) ⇒ Boolean
Returns true if update was successful.
23 24 25 |
# File 'app/actors/hyrax/actors/collections_membership_actor.rb', line 23 def update(env) assign_nested_attributes_for_collection(env) && next_actor.update(env) end |