Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
d9cf0096
Commit
d9cf0096
authored
2 years ago
by
pabois
Browse files
Options
Downloads
Patches
Plain Diff
CC
parent
f5cf8f8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/communication/website/page.rb
+6
-8
6 additions, 8 deletions
app/models/communication/website/page.rb
with
6 additions
and
8 deletions
app/models/communication/website/page.rb
+
6
−
8
View file @
d9cf0096
...
...
@@ -94,15 +94,13 @@ class Communication::Website::Page < ApplicationRecord
website
.
authors
.
map
(
&
:author
),
website
.
posts
].
flatten
if
kind_communication_posts?
dependencies
+=
website
.
education_programs
if
kind_education_programs?
dependencies
+=
website
.
education_diplomas
if
kind_education_diplomas?
dependencies
+=
website
.
research_papers
if
kind_research_papers?
dependencies
+=
website
.
organizations
if
kind_organizations?
[
'education_programs'
,
'education_diplomas'
,
'research_papers'
,
'organizations'
].
each
do
|
kind
|
dependencies
+=
website
.
send
(
kind
)
if
send
(
"kind_
#{
kind
}
?"
end
dependencies
+=
website
.
people_with_facets
if
kind_persons?
dependencies
+=
website
.
administrators
.
map
(
&
:administrator
)
if
kind_administrators?
dependencies
+=
website
.
authors
.
map
(
&
:author
)
if
kind_authors?
dependencies
+=
website
.
researchers
.
map
(
&
:researcher
)
if
kind_researchers?
dependencies
+=
website
.
teachers
.
map
(
&
:teacher
)
if
kind_teachers?
[
:administrator
,
:author
,
:researcher
,
:teacher
].
each
do
|
kind
|
dependencies
+=
website
.
send
(
kind
.
to_s
.
pluralize
).
map
(
&
kind
)
if
send
(
"kind_
#{
kind
.
to_s
.
pluralize
}
?"
)
end
dependencies
.
flatten
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment