From a7b80fcc06e34db44d5d06a293f8a463df32c630 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 14 May 2010 17:15:09 +0000 Subject: [PATCH] Use present? instead of any?. Handles nil case. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3736 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/show.rhtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 5f6ba1ba..b48ff2cd 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -70,7 +70,7 @@ <% end %> -<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %> +<% if authorize_for('issue_relations', 'new') || @issue.relations.present? %>
<%= render :partial => 'relations' %> @@ -79,14 +79,14 @@
-<% if @changesets.any? %> +<% if @changesets.present? %>

<%=l(:label_associated_revisions)%>

<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
<% end %> -<% if @journals.any? %> +<% if @journals.present? %>

<%=l(:label_history)%>

<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %> @@ -116,7 +116,7 @@ <%= render :partial => 'issues/sidebar' %> <% if User.current.allowed_to?(:add_issue_watchers, @project) || - (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %> + (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
@@ -130,4 +130,4 @@ <%= stylesheet_link_tag 'context_menu' %> <% end %> -<%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %> \ No newline at end of file +<%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>