Class: Decidim::Assembly
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Assembly
- Includes:
- HasAttachments, Participable, Publicable, Scopable
- Defined in:
- decidim-assemblies/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
Methods included from Scopable
Methods included from Publicable
#publish!, #published?, #unpublish!
Class Method Details
.promoted ⇒ Object
Scope to return only the promoted assemblies.
Returns an ActiveRecord::Relation.
37 38 39 |
# File 'decidim-assemblies/app/models/decidim/assembly.rb', line 37 def self.promoted where(promoted: true) end |
Instance Method Details
#hashtag ⇒ Object
41 42 43 |
# File 'decidim-assemblies/app/models/decidim/assembly.rb', line 41 def hashtag attributes["hashtag"].to_s.delete("#") end |