Skip to content

Commit

Permalink
try() fix for tagging author (publiclab#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Sep 9, 2016
1 parent ee5385a commit 50852a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/tag/_tagging.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>
<span id="tags">
<% @node.community_tags.each do |tag| %>
<span id="tag_<%= tag.id %>" class="label label-primary" data-toggle="tooltip" data-html="true" title="created by <strong><%= tag.author.username %></strong> <%= time_ago_in_words(Time.at(tag.date)) %> ago">
<span id="tag_<%= tag.id %>" class="label label-primary" data-toggle="tooltip" data-html="true" title="created by <strong><%= tag.try(:author).username %></strong> <%= time_ago_in_words(Time.at(tag.date)) %> ago">
<a href="<%= "/maps" if @node.type == "map" %>/tag/<%= tag.name %>"><%= tag.name %></a>
<% if current_user && (tag.uid == @node.uid || current_user.role == "admin" || current_user.role == "moderator") %>
<a class="tag-delete" data-remote="true" href="/tag/delete/<%= @node.id %>/<%= tag.id %>" data-tag-id="<%= tag.id %>">x</a>
Expand Down

0 comments on commit 50852a9

Please sign in to comment.