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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b7fd7dae
Commit
b7fd7dae
authored
Feb 14, 2016
by
Kamil Trzcinski
Committed by
James Edwards-Jones
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop complains
parent
d3b82848
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
app/controllers/projects/pages_controller.rb
app/controllers/projects/pages_controller.rb
+10
-11
app/models/pages_domain.rb
app/models/pages_domain.rb
+2
-2
No files found.
app/controllers/projects/pages_controller.rb
View file @
b7fd7dae
...
...
@@ -43,17 +43,16 @@ class Projects::PagesController < Projects::ApplicationController
end
end
def
destroy
@project
.
remove_pages
def
remove_pages
project
.
remove_pages
project
.
pages_domains
.
destroy_all
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_path
(
@project
)
}
format
.
html
do
redirect_to
(
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
notice:
'Pages were removed'
)
end
end
def
remove_pages
project
.
remove_pages
project
.
pages_domains
.
destroy_all
end
private
...
...
app/models/pages_domain.rb
View file @
b7fd7dae
...
...
@@ -62,12 +62,12 @@ class PagesDomain < ActiveRecord::Base
def
expired?
return
false
unless
x509
current
=
Time
.
new
return
current
<
x509
.
not_before
||
x509
.
not_after
<
current
current
<
x509
.
not_before
||
x509
.
not_after
<
current
end
def
subject
return
unless
x509
return
x509
.
subject
.
to_s
x509
.
subject
.
to_s
end
def
certificate_text
...
...
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