diff --git a/app/views/admin/site_customization/content_blocks/edit.html.erb b/app/views/admin/site_customization/content_blocks/edit.html.erb
index 6d0efd5e9..0a66bd5d5 100644
--- a/app/views/admin/site_customization/content_blocks/edit.html.erb
+++ b/app/views/admin/site_customization/content_blocks/edit.html.erb
@@ -1,5 +1,5 @@
<% provide :title do %>
- <%= t("admin.header.title") %> - <%= t("admin.menu.site_customization.content_blocks") %> - <%= @content_block.try(:name) || @content_block.heading.try(:name) %> (<%= @content_block.locale %>)
+ <%= t("admin.header.title") %> - <%= t("admin.menu.site_customization.content_blocks") %> - <%= @content_block.name %> (<%= @content_block.locale %>)
<% end %>
<%= back_link_to admin_site_customization_content_blocks_path %>
diff --git a/app/views/admin/site_customization/content_blocks/index.html.erb b/app/views/admin/site_customization/content_blocks/index.html.erb
index ef069e448..d7a632709 100644
--- a/app/views/admin/site_customization/content_blocks/index.html.erb
+++ b/app/views/admin/site_customization/content_blocks/index.html.erb
@@ -43,7 +43,7 @@
<% end %>
<% @headings_content_blocks.each do |content_block| %>
- | <%= link_to "#{content_block.heading.name} (#{content_block.locale})", admin_site_customization_edit_heading_content_block_path(content_block) %> |
+ <%= link_to "#{content_block.name} (#{content_block.locale})", admin_site_customization_edit_heading_content_block_path(content_block) %> |
<%= raw content_block.body %> |
<%= render Admin::TableActionsComponent.new(
diff --git a/app/views/admin/site_customization/information_texts/_tabs.html.erb b/app/views/admin/site_customization/information_texts/_tabs.html.erb
index 4947e2a8c..a4a5b1822 100644
--- a/app/views/admin/site_customization/information_texts/_tabs.html.erb
+++ b/app/views/admin/site_customization/information_texts/_tabs.html.erb
@@ -2,7 +2,7 @@
<% information_texts_tabs.each do |tab| %>
<% if tab.to_s == @tab %>
- <%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab), :class => "is-active" %>
+ <%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab), class: "is-active" %>
<% else %>
<%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab) %>
<% end %>
diff --git a/app/views/admin/valuators/_valuator_row.html.erb b/app/views/admin/valuators/_valuator_row.html.erb
index c85e159cd..47ff21947 100644
--- a/app/views/admin/valuators/_valuator_row.html.erb
+++ b/app/views/admin/valuators/_valuator_row.html.erb
@@ -10,7 +10,7 @@
|
<% if valuator.valuator_group.present? %>
- <%= valuator.valuator_group.try(:name) %>
+ <%= valuator.valuator_group&.name %>
<% else %>
<%= t("admin.valuators.index.no_group") %>
<% end %>
diff --git a/app/views/budgets/investments/_form.html.erb b/app/views/budgets/investments/_form.html.erb
index 2156b9d60..f00bfaab7 100644
--- a/app/views/budgets/investments/_form.html.erb
+++ b/app/views/budgets/investments/_form.html.erb
@@ -4,7 +4,7 @@
- <%= f.select :heading_id, budget_heading_select_options(@budget), { include_blank: true, } %>
+ <%= f.select :heading_id, budget_heading_select_options(@budget), { include_blank: true } %>
diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb
index c3863f9ce..8d1464a9f 100644
--- a/app/views/budgets/investments/_investment.html.erb
+++ b/app/views/budgets/investments/_investment.html.erb
@@ -63,8 +63,7 @@
<%= render "/budgets/investments/votes",
investment: investment,
investment_votes: investment_votes,
- vote_url: namespaced_budget_investment_vote_path(investment, value: "yes")
- %>
+ vote_url: namespaced_budget_investment_vote_path(investment, value: "yes") %>
<% elsif investment.should_show_vote_count? %>
+ ballot: ballot %>
<% elsif investment.should_show_price? %>
+ vote_url: vote_budget_investment_path(investment.budget, investment, value: "yes") %>
<% elsif investment.should_show_vote_count? %>
diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb
index b4733a29b..e520ec3cc 100644
--- a/app/views/budgets/investments/_votes.html.erb
+++ b/app/views/budgets/investments/_votes.html.erb
@@ -50,8 +50,7 @@
image_url: image_absolute_url(investment.image, :thumb),
url: budget_investment_url(investment.budget, investment),
description: investment.title,
- mobile: investment.title
- %>
+ mobile: investment.title %>
<% end %>
diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb
index b0eee0ec3..bc3976ead 100644
--- a/app/views/budgets/investments/show.html.erb
+++ b/app/views/budgets/investments/show.html.erb
@@ -7,8 +7,7 @@
investment: @investment,
investment_ids: @investment_ids,
investment_votes: @investment_votes,
- ballot: @ballot
-%>
+ ballot: @ballot %>
diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb
index 6889122f8..deebcaf54 100644
--- a/app/views/debates/show.html.erb
+++ b/app/views/debates/show.html.erb
@@ -61,8 +61,7 @@
title: @debate.title,
url: debate_url(@debate),
description: @debate.title,
- mobile: @debate.title
- %>
+ mobile: @debate.title %>
diff --git a/app/views/devise/password_expired/show.html.erb b/app/views/devise/password_expired/show.html.erb
index ac3fd10ae..8eb10f6b4 100644
--- a/app/views/devise/password_expired/show.html.erb
+++ b/app/views/devise/password_expired/show.html.erb
@@ -1,6 +1,6 @@
<%= t("devise.password_expired.expire_password") %>
-<%= form_for(resource, :as => resource_name, :url => [resource_name, :password_expired], :html => { :method => :put }) do |f| %>
+<%= form_for(resource, as: resource_name, url: [resource_name, :password_expired], html: { method: :put }) do |f| %>
<%= f.password_field :current_password %>
<%= f.password_field :password, label: t("devise.password_expired.new_password") %>
diff --git a/app/views/kaminari/_first_page.html.erb b/app/views/kaminari/_first_page.html.erb
index c97a20740..439f3257c 100644
--- a/app/views/kaminari/_first_page.html.erb
+++ b/app/views/kaminari/_first_page.html.erb
@@ -1,3 +1,3 @@
- <%= link_to t("views.pagination.first"), url, :remote => remote %>
+ <%= link_to t("views.pagination.first"), url, remote: remote %>
diff --git a/app/views/kaminari/_last_page.html.erb b/app/views/kaminari/_last_page.html.erb
index cc2929aa0..c5a7831f5 100644
--- a/app/views/kaminari/_last_page.html.erb
+++ b/app/views/kaminari/_last_page.html.erb
@@ -1,3 +1,3 @@
- <%= link_to t("views.pagination.last"), url, :remote => remote %>
+ <%= link_to t("views.pagination.last"), url, remote: remote %>
diff --git a/app/views/kaminari/_next_page.html.erb b/app/views/kaminari/_next_page.html.erb
index 6da585a67..0d1b188f0 100644
--- a/app/views/kaminari/_next_page.html.erb
+++ b/app/views/kaminari/_next_page.html.erb
@@ -1,3 +1,3 @@
diff --git a/app/views/kaminari/_page.html.erb b/app/views/kaminari/_page.html.erb
index c82b8968c..1a2625540 100644
--- a/app/views/kaminari/_page.html.erb
+++ b/app/views/kaminari/_page.html.erb
@@ -5,6 +5,6 @@
<% else %>
- <%= link_to page, url, { :remote => remote, :rel => page.next? ? "next" : page.prev? ? "prev" : nil } %>
+ <%= link_to page, url, { remote: remote, rel: page.next? ? "next" : page.prev? ? "prev" : nil } %>
<% end %>
diff --git a/app/views/kaminari/_prev_page.html.erb b/app/views/kaminari/_prev_page.html.erb
index 2ee045967..5ed7ef3a3 100644
--- a/app/views/kaminari/_prev_page.html.erb
+++ b/app/views/kaminari/_prev_page.html.erb
@@ -1,3 +1,3 @@
diff --git a/app/views/layouts/_common_head.html.erb b/app/views/layouts/_common_head.html.erb
index f034f7baf..d4c0d4daf 100644
--- a/app/views/layouts/_common_head.html.erb
+++ b/app/views/layouts/_common_head.html.erb
@@ -6,4 +6,3 @@
<%= javascript_include_tag "application", "data-turbolinks-track" => "reload" %>
<%= csrf_meta_tags %>
<%= favicon_link_tag "favicon.ico" %>
-<%= render "layouts/disable_animations_in_tests" if Rails.env.test? %>
diff --git a/app/views/layouts/_disable_animations_in_tests.html.erb b/app/views/layouts/_disable_animations_in_tests.html.erb
deleted file mode 100644
index e2df3fe4e..000000000
--- a/app/views/layouts/_disable_animations_in_tests.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= javascript_tag "jQuery.fx.off = true" %>
-
diff --git a/app/views/layouts/_officing_booth.html.erb b/app/views/layouts/_officing_booth.html.erb
index bee7e78d7..4b039584a 100644
--- a/app/views/layouts/_officing_booth.html.erb
+++ b/app/views/layouts/_officing_booth.html.erb
@@ -1,5 +1,5 @@
<% if current_user.poll_officer? %>
- <%= t("admin.officing_booth.title", booth: try(:current_booth).try(:location)) %>
+ <%= t("admin.officing_booth.title", booth: try(:current_booth)&.location) %>
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index f8ec90b25..dd3ad8add 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,5 +1,5 @@
-
+
<%= render "layouts/common_head", default_title: setting["org_name"] %>
<%= render "layouts/tracking_data" %>
diff --git a/app/views/layouts/dashboard.html.erb b/app/views/layouts/dashboard.html.erb
index 1e6f413cc..045f061b8 100644
--- a/app/views/layouts/dashboard.html.erb
+++ b/app/views/layouts/dashboard.html.erb
@@ -1,5 +1,5 @@
-
+
diff --git a/app/views/legislation/annotations/_slim_version_chooser.html.erb b/app/views/legislation/annotations/_slim_version_chooser.html.erb
index 996a93bfb..4cd42df39 100644
--- a/app/views/legislation/annotations/_slim_version_chooser.html.erb
+++ b/app/views/legislation/annotations/_slim_version_chooser.html.erb
@@ -20,7 +20,6 @@
<%= t("legislation.shared.share") %>
<%= render "/shared/social_share",
title: t("legislation.shared.share_comment", version_name: @draft_version.title.downcase, process_name: @process.title),
- url: legislation_process_draft_version_path(process, draft_version)
- %>
+ url: legislation_process_draft_version_path(process, draft_version) %>
diff --git a/app/views/legislation/annotations/show.html.erb b/app/views/legislation/annotations/show.html.erb
index 6b4cbd331..3015cdd4c 100644
--- a/app/views/legislation/annotations/show.html.erb
+++ b/app/views/legislation/annotations/show.html.erb
@@ -39,8 +39,7 @@
<%= t("legislation.shared.share") %>
<%= render "/shared/social_share",
title: t("legislation.shared.share_comment", version_name: @draft_version.title.downcase, process_name: @process.title),
- url: legislation_process_draft_version_annotations_path(@process, @draft_version)
- %>
+ url: legislation_process_draft_version_annotations_path(@process, @draft_version) %>
diff --git a/app/views/legislation/processes/_header.html.erb b/app/views/legislation/processes/_header.html.erb
index c5e462040..f0be35496 100644
--- a/app/views/legislation/processes/_header.html.erb
+++ b/app/views/legislation/processes/_header.html.erb
@@ -41,8 +41,7 @@
title: @process.title,
url: legislation_process_url(@process),
description: @process.title,
- mobile: @process.title
- %>
+ mobile: @process.title %>
<% if @process.image.present? %>
diff --git a/app/views/legislation/processes/_process.html.erb b/app/views/legislation/processes/_process.html.erb
index 98e21d613..8919ee848 100644
--- a/app/views/legislation/processes/_process.html.erb
+++ b/app/views/legislation/processes/_process.html.erb
@@ -13,7 +13,7 @@
- <%= markdown(process.summary.present? ? process.summary : first_paragraph(process.description)) %>
+ <%= markdown(process.summary.presence || first_paragraph(process.description)) %>
diff --git a/app/views/legislation/proposals/_featured_votes.html.erb b/app/views/legislation/proposals/_featured_votes.html.erb
index 979d2e90b..4c42406b0 100644
--- a/app/views/legislation/proposals/_featured_votes.html.erb
+++ b/app/views/legislation/proposals/_featured_votes.html.erb
@@ -36,8 +36,7 @@
title: proposal.title,
url: proposal_url(proposal),
description: proposal.summary,
- mobile: proposal.title
- %>
+ mobile: proposal.title %>
<% end %>
<% end %>
diff --git a/app/views/legislation/proposals/_form.html.erb b/app/views/legislation/proposals/_form.html.erb
index 9985bfa03..f1f8aef59 100644
--- a/app/views/legislation/proposals/_form.html.erb
+++ b/app/views/legislation/proposals/_form.html.erb
@@ -1,7 +1,7 @@
<%= form_for(@proposal, url: form_url) do |f| %>
<%= render "shared/errors", resource: @proposal %>
- <%= f.hidden_field(:legislation_process_id, :value => params[:process_id]) %>
+ <%= f.hidden_field(:legislation_process_id, value: params[:process_id]) %>
diff --git a/app/views/legislation/proposals/_votes.html.erb b/app/views/legislation/proposals/_votes.html.erb
index e60c4e2d4..d78c24c4d 100644
--- a/app/views/legislation/proposals/_votes.html.erb
+++ b/app/views/legislation/proposals/_votes.html.erb
@@ -70,8 +70,7 @@
title: proposal.title,
url: proposal_url(proposal),
description: proposal.summary,
- mobile: proposal.title
- %>
+ mobile: proposal.title %>
<% end %>
diff --git a/app/views/legislation/proposals/show.html.erb b/app/views/legislation/proposals/show.html.erb
index fdf7347a7..6d0baea0e 100644
--- a/app/views/legislation/proposals/show.html.erb
+++ b/app/views/legislation/proposals/show.html.erb
@@ -110,8 +110,7 @@
title: @proposal.title,
url: legislation_process_proposal_url(process_id: @process),
description: @proposal.summary,
- mobile: @proposal.title
- %>
+ mobile: @proposal.title %>
diff --git a/app/views/mailer/budget_investment_created.html.erb b/app/views/mailer/budget_investment_created.html.erb
index c7a866112..3c0c29980 100644
--- a/app/views/mailer/budget_investment_created.html.erb
+++ b/app/views/mailer/budget_investment_created.html.erb
@@ -25,7 +25,7 @@
|