Add rubocop spacing rules

We were following these rules in most places; we just didn't define them
anywhere.
This commit is contained in:
Javi Martín
2019-06-22 18:11:23 +02:00
parent c7f64f8493
commit f9ed186909
264 changed files with 652 additions and 577 deletions

View File

@@ -17,7 +17,7 @@
remote: true,
title: t("admin.booth_assignments.manage.actions.unassign"),
class: "button hollow alert expanded",
data: (booth_assignment.shifts? ? {confirm: "#{t("admin.poll_booth_assignments.alert.shifts")}"} : nil) if !@poll.expired? %>
data: (booth_assignment.shifts? ? { confirm: "#{t("admin.poll_booth_assignments.alert.shifts")}" } : nil) if !@poll.expired? %>
</td>
<% else %>
<td>

View File

@@ -21,7 +21,7 @@
method: :delete,
class: "button hollow alert expanded" %>
<% else %>
<%= link_to t("admin.poll_officers.officer.add"),{ controller: "admin/poll/officers", action: :create, user_id: officer.user_id },
<%= link_to t("admin.poll_officers.officer.add"), { controller: "admin/poll/officers", action: :create, user_id: officer.user_id },
method: :post,
class: "button success expanded" %>
<% end %>

View File

@@ -37,7 +37,7 @@
<%= fields_for :votation_type do |votation_f| %>
<div class="small-12 medium-6">
<%= votation_f.select :enum_type,
options_for_select(VotationType.enum_types.map {|k, v| [t(k, scope: :enum_type), v]},
options_for_select(VotationType.enum_types.map { |k, v| [t(k, scope: :enum_type), v] },
params.dig(:votation_type, :enum_type)), default: 0,
disabled: @question.persisted?, label: t("enum_type.title") %>
</div>
@@ -53,8 +53,8 @@
</div>
<div class="small-12 medium-6 js-prioritization_type hidden">
<%= votation_f.select :prioritization_type,
options_for_select(VotationType.prioritization_types.map {|k, v| [t(k, scope: :prioritization_type), v]},
params.dig(:votation_type, :prioritization_type) ), default: 0,
options_for_select(VotationType.prioritization_types.map { |k, v| [t(k, scope: :prioritization_type), v] },
params.dig(:votation_type, :prioritization_type)), default: 0,
disabled: @question.persisted?, label: t("prioritization_type.title") %>
</div>
<div class="small-12 medium-6 js-max_group_votes hidden">

View File

@@ -7,7 +7,7 @@
</tr>
</thead>
<tbody>
<% @poll.booth_assignments.sort_by {|ba| ba.booth.name }.each do |booth_assignment| %>
<% @poll.booth_assignments.sort_by { |ba| ba.booth.name }.each do |booth_assignment| %>
<tr id="booth_assignment_<%= booth_assignment.id %>_result">
<td><%= booth_assignment.booth.name %></td>
<td class="text-center">

View File

@@ -15,7 +15,7 @@
<div class="small-12 medium-3 column">
<label><%= t("admin.poll_shifts.new.task") %></label>
<%= f.select :task,
Poll::Shift.tasks.map {|k,v| [t("admin.poll_shifts.#{k}"), k]},
Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] },
{ prompt: t("admin.poll_shifts.new.select_task"),
label: false },
class: "js-poll-shifts" %>