Class: Decidim::Initiatives::InitiativeType

Inherits:
Api::Types::BaseObject
  • Object
show all
Defined in:
lib/decidim/api/initiative_type.rb

Overview

This type represents a Initiative.

Instance Method Summary collapse

Instance Method Details

#authorObject



42
43
44
# File 'lib/decidim/api/initiative_type.rb', line 42

def author
  object.user_group || object.author
end

#initiative_votes_countObject



38
39
40
# File 'lib/decidim/api/initiative_type.rb', line 38

def initiative_votes_count
  object.online_votes_count
end