Simplify calls to render partial
We're also adding a bit of consistency, since most of our calls to partial rendering omit the `partial` and `locals` keys.
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
title: @admin_notification.title,
|
||||
body: @admin_notification.body,
|
||||
timestamp: Time.current } %>
|
||||
<% link_text = render partial: "/notifications/notification_body", locals: locals %>
|
||||
<% link_text = render "/notifications/notification_body", locals %>
|
||||
<%= link_to_if @admin_notification.link.present?, link_text, @admin_notification.link %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
<% if @investments.any? %>
|
||||
<h3 class="inline-block"><%= page_entries_info @investments %></h3>
|
||||
<%= render partial: "admin/shared/columns_selector",
|
||||
locals: { cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] } %>
|
||||
<%= render "admin/shared/columns_selector",
|
||||
cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %>
|
||||
<br>
|
||||
|
||||
<%= render "filters_description", i18n_namespace: "admin.budget_investments.index" %>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<%= render partial: "/budgets/investments/investment_detail", locals: {investment: @investment, preview: true} %>
|
||||
<%= render "/budgets/investments/investment_detail", investment: @investment, preview: true %>
|
||||
<hr>
|
||||
|
||||
<h2 id="classification"><%= t("admin.budget_investments.show.classification") %></h2>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
<h3><%= t("admin.local_census_records.imports.show.subtitle") %></h3>
|
||||
|
||||
<%= render partial: "local_census_records", locals: {
|
||||
<%= render "local_census_records",
|
||||
title: t("admin.local_census_records.imports.show.errored"),
|
||||
id: "invalid-local-census-records",
|
||||
local_census_records: @import.invalid_records } %>
|
||||
local_census_records: @import.invalid_records %>
|
||||
|
||||
<%= render partial: "local_census_records", locals: {
|
||||
<%= render "local_census_records",
|
||||
title: t("admin.local_census_records.imports.show.created"),
|
||||
id: "created-local-census-records",
|
||||
local_census_records: @import.created_records } %>
|
||||
local_census_records: @import.created_records %>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr id="<%= dom_id(booth) %>" class="booth">
|
||||
<%= render partial: "booth_assignment", locals: { booth: booth, booth_assignment: booth.assignment_on_poll(@poll) } %>
|
||||
<%= render "booth_assignment", booth: booth, booth_assignment: booth.assignment_on_poll(@poll) %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<%= render partial: "booth", locals: { booth: booth } %>
|
||||
<%= render "booth", booth: booth %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<p><%= t("admin.system_emails.#{@system_email}.preview_detail") %></p>
|
||||
|
||||
<% @previews.each do |preview| %>
|
||||
<%= render partial: "admin/system_emails/preview_pending/#{@system_email}",
|
||||
locals: { preview: preview } %>
|
||||
<%= render "admin/system_emails/preview_pending/#{@system_email}",
|
||||
preview: preview %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
<tbody>
|
||||
<% valuators.each do |valuator| %>
|
||||
<% if valuator.is_a?(Valuator) %>
|
||||
<%= render partial: 'valuator_row', locals: {valuator: valuator} %>
|
||||
<%= render "valuator_row", valuator: valuator %>
|
||||
<% elsif valuator.valuator? %>
|
||||
<%= render partial: 'valuator_row', locals: {valuator: valuator.valuator} %>
|
||||
<%= render "valuator_row", valuator: valuator.valuator %>
|
||||
<% else %>
|
||||
<%= render partial: 'user_row', locals: {user: valuator} %>
|
||||
<%= render "user_row", user: valuator %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<% if @valuators.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @valuators %></h3>
|
||||
|
||||
<%= render partial: "valuators", locals: {valuators: @valuators} %>
|
||||
<%= render "valuators", valuators: @valuators %>
|
||||
|
||||
<%= paginate @valuators %>
|
||||
<% else %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div id="valuators">
|
||||
<% if @users.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @users %></h3>
|
||||
<%= render partial: "valuators", locals: {valuators: @users} %>
|
||||
<%= render "valuators", valuators: @users %>
|
||||
<% else %>
|
||||
<div class="callout alert margin">
|
||||
<%= t("admin.shared.no_search_results") %>
|
||||
|
||||
Reference in New Issue
Block a user