gitlab-org--gitlab-foss/app/controllers/projects/pages_controller.rb

23 lines
564 B
Ruby
Raw Normal View History

2016-02-09 12:06:55 -05:00
class Projects::PagesController < Projects::ApplicationController
layout 'project_settings'
2016-02-19 09:11:26 -05:00
before_action :authorize_read_pages!, only: [:show]
before_action :authorize_update_pages!, except: [:show]
2016-02-09 12:06:55 -05:00
def show
@domains = @project.pages_domains.order(:domain)
2016-02-09 12:06:55 -05:00
end
def destroy
2016-02-10 10:21:39 -05:00
project.remove_pages
project.pages_domains.destroy_all
2016-02-14 13:58:45 -05:00
respond_to do |format|
format.html do
redirect_to(namespace_project_pages_path(@project.namespace, @project),
notice: 'Pages were removed')
end
end
2016-02-10 10:21:39 -05:00
end
2016-02-09 12:06:55 -05:00
end