Class: Decidim::Initiatives::InitiativeType

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

Overview

This type represents a Initiative.

Instance Method Summary collapse

Instance Method Details

#authorObject



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

def author
  object.user_group || object.author
end

#initiative_votes_countObject



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

def initiative_votes_count
  object.online_votes_count
end