Skip to content

Commit

Permalink
Move db query out of partial (one step up)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Mar 15, 2024
1 parent 6aa9060 commit ddb4f1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/_tailwind/applications/_address_search.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</p>
</div>
<div class="flex-shrink-0">
<%= render "authorities/coverage_percentage" %>
<%= render "authorities/coverage_percentage", percentage: Authority.percentage_population_covered_by_all_active_authorities.to_i %>
</div>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="relative font-black text-7xl font-display text-warm-grey">
<%= image_tag "tailwind/illustration/coverage.svg", alt: "" %>
<div class="absolute left-16 top-14">
<%= Authority.percentage_population_covered_by_all_active_authorities.to_i %><span class="text-4xl">%</span>
<%= percentage %><span class="text-4xl">%</span>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/_tailwind/authorities/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="flex flex-col justify-between gap-8 mt-12 md:flex-row-reverse">
<div class="shrink-0">
<%= render "coverage_percentage" %>
<%= render "coverage_percentage", percentage: @percentage_population_covered_by_all_active_authorities %>
</div>
<div class="max-w-2xl">
<%= render "coverage_explanation",
Expand Down

0 comments on commit ddb4f1f

Please sign in to comment.