summaryrefslogtreecommitdiff
path: root/app/views/fax_accounts
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-28 11:07:14 +0100
committerspag <spag@golwen.net>2013-01-28 11:07:14 +0100
commit553115fd50ef3c35d961fa98abfd593386da5c94 (patch)
treedadad1c10c188196202c1ad716b87f84bf6e1a08 /app/views/fax_accounts
parent5908ea469819cfcd7e05ce2f22ffe1412d474b7e (diff)
fax document count fixed
Diffstat (limited to 'app/views/fax_accounts')
-rw-r--r--app/views/fax_accounts/_index_core.html.haml6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml
index f86a4ac..d694f8f 100644
--- a/app/views/fax_accounts/_index_core.html.haml
+++ b/app/views/fax_accounts/_index_core.html.haml
@@ -28,9 +28,11 @@
%br
= truncate(fax_account.station_id, :length => 20)
%td
- = link_to fax_account.fax_documents.inbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.inbound.first.try(:id)}")
+ - inbound_documents = fax_account.fax_documents.where(:inbound => true)
+ - outbound_documents = fax_account.fax_documents.where(:inbound => [false, nil])
+ = link_to inbound_documents.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{inbound_documents.first.try(:id)}")
= '/'
- = link_to fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.first.try(:id)}")
+ = link_to outbound_documents.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{outbound_documents.first.try(:id)}")
- if fax_account.fax_documents.any?
%br
%small