diff --git a/app/views/finance/invoices/show.html.haml b/app/views/finance/invoices/show.html.haml
index 4db9cebd..b57a0296 100644
--- a/app/views/finance/invoices/show.html.haml
+++ b/app/views/finance/invoices/show.html.haml
@@ -10,14 +10,14 @@
%b= heading_helper(Invoice, :supplier) + ':'
= @invoice.supplier.name
-- if @invoice.deliveries.count > 0
+- if @invoice.deliveries.any?
%p
%b= heading_helper(Invoice, :deliveries) + ':'
%span><
- @invoice.deliveries.order(:delivered_on).each_with_index do |delivery, index|
= ', ' if index > 0
= link_to format_date(delivery.delivered_on), [delivery.supplier,delivery]
-- if @invoice.orders.count > 0
+- if @invoice.orders.any?
%p
%b= heading_helper(Invoice, :orders) + ':'
%span><
diff --git a/app/views/home/profile.html.haml b/app/views/home/profile.html.haml
index ad0f34f9..c3139a76 100644
--- a/app/views/home/profile.html.haml
+++ b/app/views/home/profile.html.haml
@@ -24,7 +24,7 @@
%td.right
= link_to t('.groups.invite'), new_invite_path(id: @current_user.ordergroup),
remote: true, class: 'btn btn-success btn-small'
- - if @current_user.workgroups.count > 0
+ - if @current_user.workgroups.any?
%h3= User.human_attribute_name(:workgroup, count: 2)
%table.table.table-striped
- @current_user.workgroups.each do |workgroup|
diff --git a/app/views/suppliers/show.html.haml b/app/views/suppliers/show.html.haml
index ce7608d9..b347b149 100644
--- a/app/views/suppliers/show.html.haml
+++ b/app/views/suppliers/show.html.haml
@@ -2,7 +2,7 @@
- content_for :actionbar do
= link_to t('suppliers.index.articles', count: @supplier.articles.undeleted.count), supplier_articles_path(@supplier), class: 'btn'
- - if @supplier.stock_articles.undeleted.count > 0
+ - if @supplier.stock_articles.undeleted.any?
= link_to t('suppliers.index.stock', count: @supplier.stock_articles.undeleted.count), stock_articles_path, class: 'btn'
.row-fluid
@@ -44,7 +44,7 @@
= link_to t('ui.edit'), edit_supplier_path(@supplier), class: 'btn'
= link_to t('ui.delete'), @supplier, :data => {:confirm => t('.confirm_delete')}, :method => :delete, class: 'btn btn-danger'
- - if @deliveries.count > 0
+ - if @deliveries.any?
.span6
.pull-right
= link_to t('.show_deliveries'), supplier_deliveries_path(@supplier), class: 'btn'
@@ -61,7 +61,7 @@
%td= link_to delivery.delivered_on, [@supplier, delivery]
%td= link_to_invoice(delivery)
- - if @orders.count > 0
+ - if @orders.any?
.span6
%h2= t '.last_orders'
%table.table.table-horizontal
diff --git a/plugins/current_orders/app/views/current_orders/group_orders/_result.html.haml b/plugins/current_orders/app/views/current_orders/group_orders/_result.html.haml
index 2be5ac15..7d247d7d 100644
--- a/plugins/current_orders/app/views/current_orders/group_orders/_result.html.haml
+++ b/plugins/current_orders/app/views/current_orders/group_orders/_result.html.haml
@@ -1,5 +1,5 @@
-# XXX code duplication of foodcoop-adam's app/views/group_orders/show.html.haml
-- if @articles_grouped_by_category.count > 0
+- if @articles_grouped_by_category.any?
%table.table.table-hover
%thead
%tr