Skip to content

Commit

Permalink
use cached association for count. #390
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 15, 2020
1 parent 28233b3 commit 2777933
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1020,47 +1020,47 @@ def reference_ids
end

def reference_count
references.count
references.size
end

def citation_ids
citations.pluck(:uuid)
end

def citation_count
citations.count
citations.size
end

def part_ids
parts.pluck(:uuid)
end

def part_count
parts.count
parts.size
end

def part_of_ids
part_of.pluck(:uuid)
end

def part_of_count
part_of.count
part_of.size
end

def version_ids
versions.pluck(:uuid)
end

def version_count
versions.count
versions.size
end

def version_of_ids
version_of.pluck(:uuid)
end

def version_of_count
version_of.count
version_of.size
end

def xml_encoded
Expand Down

0 comments on commit 2777933

Please sign in to comment.