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

Fix rubocop complains

parent d3b82848
...@@ -43,26 +43,25 @@ class Projects::PagesController < Projects::ApplicationController ...@@ -43,26 +43,25 @@ class Projects::PagesController < Projects::ApplicationController
end end
end end
def destroy
@project.remove_pages
respond_to do |format|
format.html { redirect_to project_path(@project) }
end
end
def remove_pages def remove_pages
project.remove_pages project.remove_pages
project.pages_domains.destroy_all project.pages_domains.destroy_all
respond_to do |format|
format.html do
redirect_to(namespace_project_pages_path(@project.namespace, @project),
notice: 'Pages were removed')
end
end
end end
private private
def pages_domain_params def pages_domain_params
params.require(:pages_domain).permit( params.require(:pages_domain).permit(
:certificate, :certificate,
:key, :key,
:domain :domain
) )
end end
......
...@@ -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