From ba639159dd372c89bfd905299b64a37d1b3f5e74 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 25 Mar 2011 22:51:39 +0000 Subject: [PATCH 1/1] Handle changesets with an empty string as the comment --- app/views/changeset/_changeset.html.erb | 2 +- app/views/user/_contact.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changeset/_changeset.html.erb index cbcfe7470..33d8cf129 100644 --- a/app/views/changeset/_changeset.html.erb +++ b/app/views/changeset/_changeset.html.erb @@ -27,7 +27,7 @@ <% end %> - <% if changeset.tags['comment'] %> + <% if changeset.tags['comment'].to_s != '' %> <%= linkify(h(changeset.tags['comment'])) %> <% else %> <%= t'changeset.changeset.no_comment' %> diff --git a/app/views/user/_contact.html.erb b/app/views/user/_contact.html.erb index bcab838ba..d720353ee 100644 --- a/app/views/user/_contact.html.erb +++ b/app/views/user/_contact.html.erb @@ -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')}) -- 2.43.2