Update to rails 5.2.2.1

This commit is contained in:
Henne Vogelsang 2019-03-26 21:03:23 +01:00
parent 1f30bb8a2f
commit 446808da96
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0
36 changed files with 425 additions and 291 deletions

View file

@ -10,7 +10,7 @@ class SurveyQuestion < ActiveRecord::Base
ICONS = { boolean: 'dot-circle-o', choice: 'check-square-o', string: 'edit', text: 'align-left', datetime: 'clock-o', numeric: 'slack' }.freeze
validates :title, presence: true
validates :possible_answers, :max_choices, :min_choices, presence: true, if: 'choice?'
validates :possible_answers, :max_choices, :min_choices, presence: true, if: :choice?
validates :min_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true
validates :max_choices, numericality: { greater_than_or_equal_to: 1 }, allow_blank: true