Apply Style/SymbolProc rubocop rule

This style is much more concise.
This commit is contained in:
Javi Martín
2019-10-26 13:48:32 +02:00
parent 34e66acdda
commit a727dcc031
31 changed files with 46 additions and 57 deletions

View File

@@ -49,9 +49,7 @@ class Polls::QuestionsController < ApplicationController
answer.touch if answer.persisted?
answer.save!
answer.record_voter_participation(token)
@question.question_answers.visibles.where(question_id: @question).each do |question_answer|
question_answer.set_most_voted
end
@question.question_answers.visibles.where(question_id: @question).each(&:set_most_voted)
end
def store_answer