##// END OF EJS Templates
Use present? instead of any?. Handles nil case....
Eric Davis -
r3622:a7b80fcc06e3
parent child
Show More
@@ -70,7 +70,7
70 70 </div>
71 71 <% end %>
72 72
73 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
73 <% if authorize_for('issue_relations', 'new') || @issue.relations.present? %>
74 74 <hr />
75 75 <div id="relations">
76 76 <%= render :partial => 'relations' %>
@@ -79,14 +79,14
79 79
80 80 </div>
81 81
82 <% if @changesets.any? %>
82 <% if @changesets.present? %>
83 83 <div id="issue-changesets">
84 84 <h3><%=l(:label_associated_revisions)%></h3>
85 85 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
86 86 </div>
87 87 <% end %>
88 88
89 <% if @journals.any? %>
89 <% if @journals.present? %>
90 90 <div id="history">
91 91 <h3><%=l(:label_history)%></h3>
92 92 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
@@ -116,7 +116,7
116 116 <%= render :partial => 'issues/sidebar' %>
117 117
118 118 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
119 (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
119 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
120 120 <div id="watchers">
121 121 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
122 122 </div>
@@ -130,4 +130,4
130 130 <%= stylesheet_link_tag 'context_menu' %>
131 131 <% end %>
132 132 <div id="context-menu" style="display: none;"></div>
133 <%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %> No newline at end of file
133 <%= javascript_tag "new ContextMenu('#{url_for(:controller => 'issues', :action => 'context_menu')}')" %>
General Comments 0
You need to be logged in to leave comments. Login now