Class: Hyrax::Actors::DefaultAdminSetActor

Inherits:
AbstractActor show all
Defined in:
app/actors/hyrax/actors/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 AbstractActor

#next_actor

Instance Method Summary collapse

Methods inherited from AbstractActor

#initialize

Constructor Details

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

Instance Method Details

#create(env) ⇒ Boolean

Returns true if create was successful.

Parameters:

Returns:

  • (Boolean)

    true if create was successful



12
13
14
15
# File 'app/actors/hyrax/actors/default_admin_set_actor.rb', line 12

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

#update(env) ⇒ Boolean

Returns true if update was successful.

Parameters:

Returns:

  • (Boolean)

    true if update was successful



19
20
21
22
# File 'app/actors/hyrax/actors/default_admin_set_actor.rb', line 19

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