app/forms/decidim/elections/admin/answer_form.rb in decidim-elections-0.23.6 vs app/forms/decidim/elections/admin/answer_form.rb in decidim-elections-0.24.0.rc1

- old
+ new

@@ -4,17 +4,18 @@ module Elections module Admin # This class holds a Form to create/update answers from Decidim's admin panel. class AnswerForm < Decidim::Form include TranslatableAttributes + include AttachmentAttributes translatable_attribute :title, String translatable_attribute :description, String attribute :proposal_ids, Array[Integer] attribute :attachment, AttachmentForm - attribute :photos, Array[String] - attribute :add_photos, Array attribute :weight, Integer, default: 0 + + attachments_attribute :photos validates :title, translatable_presence: true validate :notify_missing_attachment_if_errored def map_model(model)