Skip to content

Commit 714c74f

Browse files
committed
Do not show empty points for guests
1 parent def70f8 commit 714c74f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/views/exercises/show.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<% end %>
99
</li>
1010

11-
<% if can? :see_points, @exercise %>
11+
<% if @current_user.guest? %>
12+
<li>Log in to see your points</li>
13+
<% elsif can? :see_points, @exercise %>
1214
<% if @exercise.available_points.empty? %>
1315
<li>No points available</li>
1416
<% else %>

0 commit comments

Comments
 (0)