Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2d242119
Commit
2d242119
authored
Feb 24, 2020
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define association between PagesDomain and Serverless::DomainCluster
parent
feef9ebc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
app/models/pages_domain.rb
app/models/pages_domain.rb
+1
-0
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+1
-0
No files found.
app/models/pages_domain.rb
View file @
2d242119
...
@@ -11,6 +11,7 @@ class PagesDomain < ApplicationRecord
...
@@ -11,6 +11,7 @@ class PagesDomain < ApplicationRecord
belongs_to
:project
belongs_to
:project
has_many
:acme_orders
,
class_name:
"PagesDomainAcmeOrder"
has_many
:acme_orders
,
class_name:
"PagesDomainAcmeOrder"
has_many
:serverless_domain_clusters
,
class_name:
'Serverless::DomainCluster'
,
inverse_of: :pages_domain
validates
:domain
,
hostname:
{
allow_numeric_hostname:
true
}
validates
:domain
,
hostname:
{
allow_numeric_hostname:
true
}
validates
:domain
,
uniqueness:
{
case_sensitive:
false
}
validates
:domain
,
uniqueness:
{
case_sensitive:
false
}
...
...
spec/models/pages_domain_spec.rb
View file @
2d242119
...
@@ -9,6 +9,7 @@ describe PagesDomain do
...
@@ -9,6 +9,7 @@ describe PagesDomain do
describe
'associations'
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
have_many
(
:serverless_domain_clusters
)
}
end
end
describe
'validate domain'
do
describe
'validate domain'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment