1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-22 08:21:14 +00:00

Use exists? instead of count (#24839).

Patch by Vincent Robert and Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16211 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2017-01-16 18:12:49 +00:00
parent 62c7d11427
commit c7f03c00a9
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class Repository::Git < Repository
return if prev_db_heads.sort == repo_heads.sort
h["db_consistent"] ||= {}
if changesets.count == 0
if ! changesets.exists?
h["db_consistent"]["ordering"] = 1
merge_extra_info(h)
self.save

View File

@ -16,7 +16,7 @@
<tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
<td>
<% unless tracker.workflow_rules.count > 0 %>
<% unless tracker.workflow_rules.exists? %>
<span class="icon icon-warning">
<%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>)
</span>