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
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
......
......@@ -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