Apply Style/HashSyntax rubocop rule

We were already using it almost everywhere.
This commit is contained in:
Javi Martín
2019-10-26 01:04:57 +02:00
parent 70da5a3801
commit b5eeb3f32f
7 changed files with 18 additions and 15 deletions

View File

@@ -5,10 +5,10 @@ wb.add_worksheet(name: "Resume") do |sheet|
sheet.add_row [t("legislation.summary.debates_phase"), t("legislation.questions.question.total", count: @process.questions.count)]
@process.questions.each do |question|
sheet.add_row [question.title, t("legislation.summary.comments", count: question.comments.count)]
sheet.add_hyperlink :location => legislation_process_question_url(question.process, question), :ref => sheet.rows.last.cells.first
sheet.add_hyperlink location: legislation_process_question_url(question.process, question), ref: sheet.rows.last.cells.first
question.best_comments(3).each do |comment|
sheet.add_row [comment.body, (comment.cached_votes_up - comment.cached_votes_down).to_s + space + t("legislation.summary.votes")]
sheet.add_hyperlink :location => comment_url(comment), :ref => sheet.rows.last.cells.first
sheet.add_hyperlink location: comment_url(comment), ref: sheet.rows.last.cells.first
end
sheet.add_row ["", ""]
end
@@ -19,7 +19,7 @@ wb.add_worksheet(name: "Resume") do |sheet|
Legislation::Proposal.where(legislation_process_id: @process).where(selected: true).order("cached_votes_score desc").each do |proposal|
sheet.add_row [proposal.title,
(proposal.cached_votes_total - proposal.cached_votes_down).to_s + space + t("legislation.summary.votes")]
sheet.add_hyperlink :location => legislation_process_proposal_url(proposal.legislation_process_id, proposal), :ref => sheet.rows.last.cells.first
sheet.add_hyperlink location: legislation_process_proposal_url(proposal.legislation_process_id, proposal), ref: sheet.rows.last.cells.first
end
sheet.add_row ["", ""]
end
@@ -30,7 +30,7 @@ wb.add_worksheet(name: "Resume") do |sheet|
@process.get_best_annotation_comments.take(10).each do |comment|
sheet.add_row [Legislation::Annotation.find_by(id: comment.commentable_id).quote, ""]
sheet.add_row [comment.body, (comment.cached_votes_up - comment.cached_votes_down).to_s + space + t("legislation.summary.votes")]
sheet.add_hyperlink :location => comment_url(comment), :ref => sheet.rows.last.cells.first
sheet.add_hyperlink location: comment_url(comment), ref: sheet.rows.last.cells.first
end
end
end