Class: Decidim::Meetings::Answer
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Meetings::Answer
- Includes:
- DownloadYourData
- Defined in:
- app/models/decidim/meetings/answer.rb
Overview
The data store for an Answer in the Decidim::Meetings
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.export_serializer ⇒ Object
26 27 28 |
# File 'app/models/decidim/meetings/answer.rb', line 26 def self.export_serializer Decidim::Meetings::DownloadYourDataUserAnswersSerializer end |
.user_collection(user) ⇒ Object
22 23 24 |
# File 'app/models/decidim/meetings/answer.rb', line 22 def self.user_collection(user) where(decidim_user_id: user.id) end |
Instance Method Details
#organization ⇒ Object
30 31 32 33 |
# File 'app/models/decidim/meetings/answer.rb', line 30 def organization user.organization if user.present? questionnaire&.questionnaire_for.try(:organization) end |