Method: Scrivito::Workspace.create

Defined in:
app/cms/scrivito/workspace.rb

.create(attributes) ⇒ Scrivito::Workspace

Create a new workspace.

Examples:

Create a workspace, providing its title:

Scrivito::Workspace.create(title: "Jane")

Create a workspace, providing auto_update:

# Workspace will not be updated until it is published.
Scrivito::Workspace.create(auto_update: false)

Parameters:

  • attributes (Hash)

Options Hash (attributes):

  • :title (String)

    title of the workspace.

  • :auto_update (Boolean)

    Specifies whether changes published intermediately are applied automatically and instantly to the working copy. The default is true. Setting this option to false requires rebasing the working copy (manually) to keep it up to date.

Returns:


146
147
148
# File 'app/cms/scrivito/workspace.rb', line 146

def self.create(attributes)
  find(create_async(attributes).result['id'])
end