Class: Decidim::Component

Inherits:
ApplicationRecord show all
Defined in:
app/models/decidim/component.rb

Overview

A Component represents the association between a participatory process and a Component Engine. It configures how that component should behave, its name, and other relevant fields.

Instance Method Summary collapse

Instance Method Details

#manifestObject

Public: Finds the manifest this particular component is associated to.

Returns a ComponentManifest.



23
24
25
# File 'app/models/decidim/component.rb', line 23

def manifest
  Decidim.find_component_manifest(manifest_name)
end

#manifest=(manifest) ⇒ Object

Public: Assigns a manifest to this component.

manifest - The ComponentManifest for this Component.

Returns nothing.



32
33
34
# File 'app/models/decidim/component.rb', line 32

def manifest=(manifest)
  self.manifest_name = manifest.name
end