Skip to content

Commit

Permalink
Touch answer model to force the updated_at value update
Browse files Browse the repository at this point in the history
  • Loading branch information
bertocq committed Oct 6, 2017
1 parent cb15428 commit 81f65f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/polls/questions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def answer
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

Expand Down

0 comments on commit 81f65f1

Please sign in to comment.