From 2777933ba46f2544003f5bf658775ee0e40218fb Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 15 Feb 2020 15:25:06 +0100 Subject: [PATCH] use cached association for count. #390 --- app/models/doi.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index 5d0f0bd65..6732334ae 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -1020,7 +1020,7 @@ def reference_ids end def reference_count - references.count + references.size end def citation_ids @@ -1028,7 +1028,7 @@ def citation_ids end def citation_count - citations.count + citations.size end def part_ids @@ -1036,7 +1036,7 @@ def part_ids end def part_count - parts.count + parts.size end def part_of_ids @@ -1044,7 +1044,7 @@ def part_of_ids end def part_of_count - part_of.count + part_of.size end def version_ids @@ -1052,7 +1052,7 @@ def version_ids end def version_count - versions.count + versions.size end def version_of_ids @@ -1060,7 +1060,7 @@ def version_of_ids end def version_of_count - version_of.count + version_of.size end def xml_encoded