1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-03 04:25:21 +02:00

Hide infinity trend percentage changes (#1261)

This commit is contained in:
Zach Gollwitzer 2024-10-07 16:20:36 -04:00 committed by GitHub
parent d2a6ab1e45
commit c397f1bd2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -135,7 +135,9 @@
<% @top_savers.first(3).each do |account| %>
<%= link_to account, class: "border border-alpha-black-25 rounded-full p-1 pr-2 flex items-center gap-1 text-xs text-gray-900 font-medium hover:bg-gray-25" do %>
<%= image_tag account_logo_url(account), class: "w-5 h-5" %>
<span><%= account.savings_rate > 0 ? "+" : "-" %><%= number_to_percentage(account.savings_rate.abs * 100, precision: 2) %></span>
<% unless account.savings_rate.infinite? %>
<span><%= account.savings_rate > 0 ? "+" : "-" %><%= number_to_percentage(account.savings_rate.abs * 100, precision: 2) %></span>
<% end %>
<% end %>
<% end %>
<% if @top_savers.count > 3 %>