Skip to content
Snippets Groups Projects
Unverified Commit c9397f14 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

Merge pull request #666 from noesya/fix/website-deps-memoization

Memoization des dépendances liées aux blocs dans le website
parents 83d17ca4 384a4d82
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ module Communication::Website::WithDependencies
end
def blocks_dependencies
blocks_dependencies ||= blocks.collect(&:git_dependencies).flatten.compact.uniq
@blocks_dependencies ||= blocks.collect(&:git_dependencies).flatten.compact.uniq
end
def education_diplomas
......@@ -73,7 +73,7 @@ module Communication::Website::WithDependencies
end
def people_in_blocks
blocks_dependencies.reject { |dependency| !dependency.is_a? University::Person }
@people_in_blocks ||= blocks_dependencies.reject { |dependency| !dependency.is_a? University::Person }
end
def organizations
......@@ -81,11 +81,11 @@ module Communication::Website::WithDependencies
end
def organizations_in_blocks
blocks_dependencies.reject { |dependency| !dependency.is_a? University::Organization }
@organizations_in_blocks ||= blocks_dependencies.reject { |dependency| !dependency.is_a? University::Organization }
end
def people_with_facets_in_blocks
blocks_dependencies.reject { |dependency| !dependency.class.to_s.start_with?('University::Person') }
@people_with_facets_in_blocks ||= blocks_dependencies.reject { |dependency| !dependency.class.to_s.start_with?('University::Person') }
end
def people
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment