Class: Decidim::Assembly
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::Assembly
- Includes:
- Followable, HasAttachments, Participable, Publicable, Scopable
- Defined in:
- app/models/decidim/assembly.rb
Overview
Interaction between a user and an organization can be done via an Assembly. It’s a unit of action from the Organization point of view that groups several features (proposals, debates…) that can be enabled or disabled.
Class Method Summary collapse
-
.promoted ⇒ Object
Scope to return only the promoted assemblies.
Instance Method Summary collapse
Class Method Details
.promoted ⇒ Object
Scope to return only the promoted assemblies.
Returns an ActiveRecord::Relation.
38 39 40 |
# File 'app/models/decidim/assembly.rb', line 38 def self.promoted where(promoted: true) end |
Instance Method Details
#hashtag ⇒ Object
42 43 44 |
# File 'app/models/decidim/assembly.rb', line 42 def hashtag attributes["hashtag"].to_s.delete("#") end |
#to_param ⇒ Object
46 47 48 |
# File 'app/models/decidim/assembly.rb', line 46 def to_param slug end |