Skip to content

Commit

Permalink
chore: cache head tag names on the domain object
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 5, 2019
1 parent f71c1a6 commit a7c2518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact_broker/pacts/all_pact_publications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def to_domain_without_tags
def head_tag_names
# Avoid circular dependency
require 'pact_broker/pacts/latest_tagged_pact_publications'
LatestTaggedPactPublications.where(id: id).select(:tag_name).collect{|t| t[:tag_name]}
@head_tag_names ||= LatestTaggedPactPublications.where(id: id).select(:tag_name).collect{|t| t[:tag_name]}
end

def to_domain_with_content
Expand Down

0 comments on commit a7c2518

Please sign in to comment.