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
end
end
def destroy
@project.remove_pages
respond_to do |format|
format.html { redirect_to project_path(@project) }
end
end
def remove_pages
project.remove_pages
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
private
def pages_domain_params
params.require(:pages_domain).permit(
:certificate,
:key,
:domain
:certificate,
:key,
:domain
)
end
......
......@@ -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
......
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