Touch answer model to force the updated_at value update
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user