diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-20 18:19:03 +0300 |
commit | 14bd84b61276ef29b97d23642d698de769bacfd2 (patch) | |
tree | f9eba90140c1bd874211dea17750a0d422c04080 /app/models/pages/lookup_path.rb | |
parent | 891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff) |
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'app/models/pages/lookup_path.rb')
-rw-r--r-- | app/models/pages/lookup_path.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/models/pages/lookup_path.rb b/app/models/pages/lookup_path.rb index a1ba48f3ab0..222cde19da7 100644 --- a/app/models/pages/lookup_path.rb +++ b/app/models/pages/lookup_path.rb @@ -49,19 +49,25 @@ module Pages if project.pages_namespace_url == project.pages_url '/' else - project.full_path.delete_prefix(trim_prefix) + '/' + "#{project.full_path.delete_prefix(trim_prefix)}/" end end strong_memoize_attr :prefix + def unique_domain + return unless project.project_setting.pages_unique_domain_enabled? + + project.project_setting.pages_unique_domain + end + strong_memoize_attr :unique_domain + private attr_reader :project, :trim_prefix, :domain def deployment - strong_memoize(:deployment) do - project.pages_metadatum.pages_deployment - end + project.pages_metadatum.pages_deployment end + strong_memoize_attr :deployment end end |