Commit d67299fb authored by jplang's avatar jplang

Use exists? instead of count (#24839).

Patch by Vincent Robert and Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@16211 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 9baeabf8
......@@ -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
......
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment