Class: Decidim::Assembly

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

Instance Method Summary collapse

Class Method Details

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

#hashtagObject



42
43
44
# File 'app/models/decidim/assembly.rb', line 42

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

#to_paramObject



46
47
48
# File 'app/models/decidim/assembly.rb', line 46

def to_param
  slug
end