Skip to content

Commit 6768c89

Browse files
committed
Add guard around course.email
1 parent b835e30 commit 6768c89

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/views/courses/show.html.erb

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
<tr class="cmu_table_odd">
2727
<td>Email:</td>
2828
<td>
29-
<%= @course.email %>
30-
<% if @course.updating_email %> (...updating...)
31-
<% else %>
32-
<%= link_to '(Who is on it?) ', mailing_list_path(@course.email) %>
29+
<% if @course.email.present? %>
30+
<%= @course.email %>
31+
<% if @course.updating_email %> (...updating...)
32+
<% else %>
33+
<%= link_to '(Who is on it?) ', mailing_list_path(@course.email) %>
34+
<% end %>
3335
<% end %>
3436
</td>
3537
</tr>

0 commit comments

Comments
 (0)