Class: Decidim::Meetings::DownloadYourDataUserAnswersSerializer
- Inherits:
-
Exporters::Serializer
- Object
- Exporters::Serializer
- Decidim::Meetings::DownloadYourDataUserAnswersSerializer
- Includes:
- TranslationsHelper
- Defined in:
- lib/decidim/meetings/download_your_data_user_answers_serializer.rb
Instance Method Summary collapse
-
#serialize ⇒ Object
Serializes an user answer for download your data.
Instance Method Details
#serialize ⇒ Object
Serializes an user answer for download your data
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/decidim/meetings/download_your_data_user_answers_serializer.rb', line 8 def serialize { id: resource.id, user: { name: resource.user.name, email: resource.user.email }, questionnaire: { id: resource.question.questionnaire.id }, question: { id: resource.question.id, body: translated_attribute(resource.question.body) }, answer: normalize_body(resource) } end |