Class: Decidim::ParticipatorySpaceManifest

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/decidim/participatory_space_manifest.rb

Overview

This class handles all the logic associated to configuring a participatory space, the highest level object of Decidim.

It’s normally not used directly but through the API exposed through ‘Decidim.register_participatory_space`.

Instance Method Summary collapse

Instance Method Details

#route_nameObject

The name of the named Rails route to create the url to the resource.

Returns a String.



50
51
52
# File 'lib/decidim/participatory_space_manifest.rb', line 50

def route_name
  super || model_class_name.demodulize.underscore
end

#seed!Object

Public: Creates the seeds for this features in order to populate the database.

Returns nothing.



43
44
45
# File 'lib/decidim/participatory_space_manifest.rb', line 43

def seed!
  @seeds&.call
end

#seeds(&block) ⇒ Object

Public: A block that gets called when seeding for this feature takes place.

Returns nothing.



36
37
38
# File 'lib/decidim/participatory_space_manifest.rb', line 36

def seeds(&block)
  @seeds = block
end