Commit b7fd7dae authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by James Edwards-Jones

Fix rubocop complains

parent d3b82848
...@@ -43,17 +43,16 @@ class Projects::PagesController < Projects::ApplicationController ...@@ -43,17 +43,16 @@ class Projects::PagesController < Projects::ApplicationController
end end
end end
def destroy def remove_pages
@project.remove_pages project.remove_pages
project.pages_domains.destroy_all
respond_to do |format| 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
end end
def remove_pages
project.remove_pages
project.pages_domains.destroy_all
end end
private private
......
...@@ -62,12 +62,12 @@ class PagesDomain < ActiveRecord::Base ...@@ -62,12 +62,12 @@ class PagesDomain < ActiveRecord::Base
def expired? def expired?
return false unless x509 return false unless x509
current = Time.new current = Time.new
return current < x509.not_before || x509.not_after < current current < x509.not_before || x509.not_after < current
end end
def subject def subject
return unless x509 return unless x509
return x509.subject.to_s x509.subject.to_s
end end
def certificate_text def certificate_text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment