Class: Hyrax::DefaultAdminSetActor

Inherits:
Actors::AbstractActor show all
Defined in:
app/actors/hyrax/default_admin_set_actor.rb

Overview

Note:

Creates AdminSet, Hyrax::PermissionTemplate, Sipity::Workflow (with activation)

Ensures that the default AdminSet id is set if this form doesn’t have an admin_set_id provided. This should come before the Hyrax::Actors::InitializeWorkflowActor, so that the correct workflow can be kicked off.

Instance Attribute Summary

Attributes inherited from Actors::AbstractActor

#next_actor

Instance Method Summary collapse

Methods inherited from Actors::AbstractActor

#initialize

Constructor Details

This class inherits a constructor from Hyrax::Actors::AbstractActor

Instance Method Details

#create(attributes) ⇒ Object



9
10
11
12
# File 'app/actors/hyrax/default_admin_set_actor.rb', line 9

def create(attributes)
  ensure_admin_set_attribute!(attributes)
  next_actor.create(attributes)
end

#update(attributes) ⇒ Object



14
15
16
17
# File 'app/actors/hyrax/default_admin_set_actor.rb', line 14

def update(attributes)
  ensure_admin_set_attribute!(attributes)
  next_actor.update(attributes)
end