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

20 lines
395 B
Ruby
Raw Normal View History

2016-04-29 13:14:38 +00:00
class Projects::EnvironmentsController < Projects::ApplicationController
layout 'project'
2016-06-10 21:36:54 +00:00
before_action :authorize_read_environment!
before_action :environment, only: [:show]
2016-04-29 13:14:38 +00:00
def index
2016-06-10 21:36:54 +00:00
@environments = project.environments
2016-04-29 13:14:38 +00:00
end
def show
end
2016-06-10 21:36:54 +00:00
private
def environment
@environment ||= project.environments.find(params[:id].to_s)
@environment || render_404
2016-04-29 13:14:38 +00:00
end
end