From e3e4d22a912554284e73fb63391591da29e1004b Mon Sep 17 00:00:00 2001 From: Matt Brewer Date: Sat, 16 Feb 2013 20:25:06 -0500 Subject: [PATCH] Admin::Projects#roadmap had exception in math in certain situations --- app/views/projects/_project_information_sidebar.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_project_information_sidebar.html.erb b/app/views/projects/_project_information_sidebar.html.erb index 83f8a53..f6c6344 100644 --- a/app/views/projects/_project_information_sidebar.html.erb +++ b/app/views/projects/_project_information_sidebar.html.erb @@ -15,13 +15,13 @@ Hours / Person <% hours = (total_hours.to_f / num_assignees.to_f) rescue 0.0 %> - <% hours = 0.0 if hours.nan? %> + <% hours = 0.0 if hours.nan? or hours.infinite? %> <%= number_to_human(hours) %> Tickets / Person <% hours = (tickets.count.to_f / num_assignees) rescue 0.0 %> - <% hours = 0.0 if hours.nan? %> + <% hours = 0.0 if hours.nan? or hours.infinite? %> <%= number_to_human(hours) %>