Skip to content

Commit

Permalink
Merge pull request #2207 from zendesk/grosser/author
Browse files Browse the repository at this point in the history
do not blow up on missing author url and display missing author nicely
  • Loading branch information
grosser authored Aug 22, 2017
2 parents 384ef67 + 53cc6f6 commit 1049803
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/changeset/_commits.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
<%= image_tag url, width: 20, height: 20 %>
<% end %>
</td>
<td><%= link_to_if commit.author.present?, commit.author_name, commit.author&.url %></td>
<td>
<% name = commit.author_name.presence || "Unknown" %>
<% url = commit.author&.url %>
<%= link_to_if(url, name, url) %></td>
<td><%= link_to commit.summary, commit.url %></td>
<td align="right"><code><%= link_to commit.short_sha, commit.url %></code></td>
</tr>
Expand Down

0 comments on commit 1049803

Please sign in to comment.