From 81f65f1ac97517933bf32b0c116198d631dbd105 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Fri, 6 Oct 2017 19:57:52 +0200 Subject: [PATCH] Touch answer model to force the updated_at value update --- app/controllers/polls/questions_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/polls/questions_controller.rb b/app/controllers/polls/questions_controller.rb index 490b32fbe..7fecefe98 100644 --- a/app/controllers/polls/questions_controller.rb +++ b/app/controllers/polls/questions_controller.rb @@ -9,6 +9,7 @@ class Polls::QuestionsController < ApplicationController answer = @question.answers.find_or_initialize_by(author: current_user) answer.answer = params[:answer] + answer.touch if answer.persisted? answer.save! answer.record_voter_participation