app/models/decidim/forms/answer.rb in decidim-forms-0.26.10 vs app/models/decidim/forms/answer.rb in decidim-forms-0.27.0.rc1
- old
+ new
@@ -2,11 +2,11 @@
module Decidim
module Forms
# The data store for an Answer in the Decidim::Forms
class Answer < Forms::ApplicationRecord
- include Decidim::DataPortability
+ include Decidim::DownloadYourData
include Decidim::NewsletterParticipant
include Decidim::HasAttachments
belongs_to :user, class_name: "Decidim::User", foreign_key: "decidim_user_id", optional: true
belongs_to :questionnaire, class_name: "Questionnaire", foreign_key: "decidim_questionnaire_id"
@@ -27,10 +27,10 @@
def self.user_collection(user)
where(decidim_user_id: user.id)
end
def self.export_serializer
- Decidim::Forms::DataPortabilityUserAnswersSerializer
+ Decidim::Forms::DownloadYourDataUserAnswersSerializer
end
def self.newsletter_participant_ids(component)
surveys = Decidim::Surveys::Survey.joins(:component, :questionnaire).where(component: component)
questionnaires = Decidim::Forms::Questionnaire.includes(:questionnaire_for)