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



22
23
24
25
# File 'app/actors/hyrax/actors/default_admin_set_actor.rb', line 22

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

#update(env) ⇒ Boolean

Returns true if update was successful.

Parameters:

Returns:

  • (Boolean)

    true if update was successful



29
30
31
32
# File 'app/actors/hyrax/actors/default_admin_set_actor.rb', line 29

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