Small fixes for Poll Question Answer ordering

This commit is contained in:
Bertocq
2017-10-11 12:05:20 +02:00
parent 5ff0047c9f
commit 34c278db74
6 changed files with 15 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ class PollsController < ApplicationController
def show
@questions = @poll.questions.for_render.sort_for_list
@token = poll_voter_token(@poll, current_user)
@poll_questions_answers = Poll::Question::Answer.where(question: @poll.questions)
@answers_by_question_id = {}
poll_answers = ::Poll::Answer.by_question(@poll.question_ids).by_author(current_user.try(:id))