Handle changesets with an empty string as the comment

This commit is contained in:
Tom Hughes 2011-03-25 22:51:39 +00:00
parent 3fbf7891cc
commit ba639159dd
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@
<% end %>
<td class="<%= cl %> comment">
<% if changeset.tags['comment'] %>
<% if changeset.tags['comment'].to_s != '' %>
<%= linkify(h(changeset.tags['comment'])) %>
<% else %>
<%= t'changeset.changeset.no_comment' %>

View file

@ -19,7 +19,7 @@
<% changeset = contact.changesets.first %>
<% if changeset %>
<%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
<% comment = changeset.tags['comment'] ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %>
<% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %>
"<%= link_to(comment,
{:controller => 'browse', :action => 'changeset', :id => changeset.id},
{:title => t('changeset.changeset.view_changeset_details')})