Extract method to check the current phase

This commit is contained in:
Javi Martín
2021-02-18 20:34:24 +01:00
parent 46e80bf430
commit 70cf956210
4 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
<ul class="no-bullet budget-phases">
<% budget.published_phases.each do |phase| %>
<li class="phase <%= "is-active" if phase == budget.current_phase %>">
<li class="phase <%= "is-active" if phase.current? %>">
<h3><%= t("budgets.phase.#{phase.kind}") %></h3>
<span>
<%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %>