Replace "count > 0" with "any?"

This commit is contained in:
Patrick Gansterer 2016-03-04 17:39:06 +01:00
parent 97f81d9826
commit 1efd3745df
4 changed files with 7 additions and 7 deletions

View file

@ -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|