app/models/decidim/forms/answer.rb in decidim-forms-0.22.0 vs app/models/decidim/forms/answer.rb in decidim-forms-0.23.0
- old
+ new
@@ -15,12 +15,9 @@
class_name: "AnswerChoice",
foreign_key: "decidim_answer_id",
dependent: :destroy,
inverse_of: :answer
- validates :body, presence: true, if: -> { question.mandatory_body? }
- validates :choices, presence: true, if: -> { question.mandatory_choices? }
-
validate :user_questionnaire_same_organization
validate :question_belongs_to_questionnaire
def self.user_collection(user)
where(decidim_user_id: user.id)