Class: Decidim::ParticipatoryProcess

Inherits:
ApplicationRecord
  • Object
show all
Includes:
HasAttachments, Participable, Publicable, Scopable
Defined in:
app/models/decidim/participatory_process.rb

Overview

Interaction between a user and an organization is done via a ParticipatoryProcess. It’s a unit of action from the Organization point of view that groups several features (proposals, debates…) distributed in steps that get enabled or disabled depending on which step is currently active.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

Scope to return only the promoted processes.

Returns an ActiveRecord::Relation.



58
59
60
# File 'app/models/decidim/participatory_process.rb', line 58

def self.promoted
  where(promoted: true)
end

Instance Method Details

#hashtagObject



62
63
64
# File 'app/models/decidim/participatory_process.rb', line 62

def hashtag
  attributes["hashtag"].to_s.delete("#")
end

#to_paramObject



66
67
68
# File 'app/models/decidim/participatory_process.rb', line 66

def to_param
  slug
end