Add support for open-ended questions in admin section
Introduce a new "open" votation type for poll questions in the admin interface. This type allows open answers provided by the user.
This commit is contained in:
@@ -27,7 +27,7 @@ class Poll::Question < ApplicationRecord
|
||||
accepts_nested_attributes_for :question_options, reject_if: :all_blank, allow_destroy: true
|
||||
accepts_nested_attributes_for :votation_type
|
||||
|
||||
delegate :multiple?, :vote_type, to: :votation_type, allow_nil: true
|
||||
delegate :multiple?, :open?, :vote_type, to: :votation_type, allow_nil: true
|
||||
|
||||
scope :sort_for_list, -> { order(Arel.sql("poll_questions.proposal_id IS NULL"), :created_at) }
|
||||
scope :for_render, -> { includes(:author, :proposal) }
|
||||
|
||||
Reference in New Issue
Block a user