Remove poll votation types
Unfortunately this feature wasn't properly reviewed and tested, and it
had many bugs, some of them critical and hard to fix, like validations
being skipped in concurrent requests.
So we're removing it before releasing version 1.1. We might add it back
in the future if we manage to solve the critical issues.
This commit reverts commit 836f9ba7.
This commit is contained in:
@@ -22,7 +22,6 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
|
||||
|
||||
def create
|
||||
@question.author = @question.proposal&.author || current_user
|
||||
@question.votation_type = VotationType.build_by_type(@question, params[:votation_type])
|
||||
|
||||
if @question.save
|
||||
redirect_to admin_question_path(@question)
|
||||
@@ -54,18 +53,11 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
|
||||
redirect_to admin_questions_path, notice: notice
|
||||
end
|
||||
|
||||
def get_options_traductions
|
||||
render json: {
|
||||
traduction: t("polls.index.descriptions.#{VotationType.enum_types.key params[:enum_type].to_i}")
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def question_params
|
||||
attributes = [:poll_id, :question, :proposal_id]
|
||||
params.require(:poll_question).permit(*attributes, translation_params(Poll::Question),
|
||||
:votation_type, :max_votes, :prioritization_type, :max_groups_answers)
|
||||
params.require(:poll_question).permit(*attributes, translation_params(Poll::Question))
|
||||
end
|
||||
|
||||
def search_params
|
||||
|
||||
Reference in New Issue
Block a user