Method: Contentful::Management::EditorInterface#update

Defined in:
lib/contentful/management/editor_interface.rb

#update(attributes) ⇒ Contentful::Management::EditorInterface

Updates an Editor Interface

Parameters:

  • attributes (Hash)

Options Hash (attributes):

  • :controls, (Array<Hash>)

    :sidebar

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/contentful/management/editor_interface.rb', line 66

def update(attributes)
  ResourceRequester.new(client, self.class).update(
    self,
    {
      space_id: space.id,
      environment_id: environment_id,
      content_type_id: content_type.id,
      editor_id: id
    },
    {
      'controls' => attributes[:controls] || controls,
      'sidebar' => attributes.fetch(:sidebar, sidebar)
    }.compact,
    version: sys[:version]
  )
end