Class: Decidim::Consultations::ConsultationQuestionType

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

Overview

This type represents a consultation.

Instance Method Summary collapse

Instance Method Details


51
52
53
# File 'decidim-consultations/lib/decidim/api/consultation_question_type.rb', line 51

def banner_image
  object.attached_uploader(:banner_image).path
end

#componentsObject


23
24
25
26
27
# File 'decidim-consultations/lib/decidim/api/consultation_question_type.rb', line 23

def components
  Decidim::Component.where(
    participatory_space: object
  ).published
end

#hero_imageObject


55
56
57
# File 'decidim-consultations/lib/decidim/api/consultation_question_type.rb', line 55

def hero_image
  object.attached_uploader(:hero_image).path
end