Commit 9c70ad100e2943fb94239f299f8b94dd935965fd
Committed by
Diego Camarinha
1 parent
afbb7c31
Exists in
master
and in
29 other branches
[Mezuro] Bugfix: Results wouldn't show if there was only one decimal space
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/mezuro/views/content_viewer/_module_result.rhtml
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | <% range = metric_result.range %> | 19 | <% range = metric_result.range %> |
| 20 | <tr title="<%= range.nil? ? '' : range.comments %>"> | 20 | <tr title="<%= range.nil? ? '' : range.comments %>"> |
| 21 | <td><%= metric_result.metric.name %></td> | 21 | <td><%= metric_result.metric.name %></td> |
| 22 | - <td><%= metric_result.value.slice(/[0-9]+\.[0-9]{2}/) %></td> <!--FIXME: Move to helper eventually--> | 22 | + <td><%= metric_result.value.slice(/[0-9]+\.[0-9]{1,2}/) %></td> <!--FIXME: Move to helper eventually--> |
| 23 | <td><%= metric_result.weight %></td> | 23 | <td><%= metric_result.weight %></td> |
| 24 | <% if range.nil? %> | 24 | <% if range.nil? %> |
| 25 | <td></td> | 25 | <td></td> |
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | <td colspan = "4" align = "right"> | 34 | <td colspan = "4" align = "right"> |
| 35 | <strong> | 35 | <strong> |
| 36 | <%= _('Grade:') %> | 36 | <%= _('Grade:') %> |
| 37 | - <%= module_result.grade.slice(/[0-9]+\.[0-9]{2}/) %> <!--FIXME: Move to helper eventually --> | 37 | + <%= module_result.grade.slice(/[0-9]+\.[0-9]{1,2}/) %> <!--FIXME: Move to helper eventually --> |
| 38 | </strong> | 38 | </strong> |
| 39 | </td> | 39 | </td> |
| 40 | </tr> | 40 | </tr> |