Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index af640bd8296..6d82deb891c 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -967,6 +967,15 @@ class Project < ApplicationRecord
def project_features_defaults
PROJECT_FEATURES_DEFAULTS
end
+
+ def by_pages_enabled_unique_domain(domain)
+ without_deleted
+ .joins(:project_setting)
+ .find_by(project_setting: {
+ pages_unique_domain_enabled: true,
+ pages_unique_domain: domain
+ })
+ end
end
def initialize(attributes = nil)