Commit 71cd203ac4d23e266872efb1f16760a882a2b77e
1 parent
d3732796
Exists in
master
Do not crash when there is no point type associated to a point
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
views/gamification/dashboard.html.erb
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | <div class="scores"> |
| 23 | 23 | <h3><%= _('Latest Score Points') %></h3> |
| 24 | 24 | <% @target.score_points.order('created_at desc').limit(5).each do |point| %> |
| 25 | - <div class="score <%= point.point_type.name %> <%= score_point_class(point) %> <%= score_point_action_class(point) %>"> | |
| 25 | + <div class="score <%= point.point_type.present? ? point.point_type.name : '' %> <%= score_point_class(point) %> <%= score_point_action_class(point) %>"> | |
| 26 | 26 | <span class="value"><%= point.num_points %></span> |
| 27 | 27 | <span class="category"><%= score_point_target_link point, _(score_point_category(point)) %></span> |
| 28 | 28 | <span class="date timeago" title="<%= point.created_at %>"><%= point.created_at %></span> | ... | ... |