Class: Decidim::Assembly

Inherits:
ApplicationRecord show all
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

Instance Method Summary collapse

Methods included from Scopable

#has_subscopes?, #subscopes

Methods included from Publicable

#publish!, #published?, #unpublish!

Class Method Details

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

#hashtagObject



41
42
43
# File 'decidim-assemblies/app/models/decidim/assembly.rb', line 41

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