summaryrefslogtreecommitdiff
path: root/app/controllers/projects/environments_controller.rb
blob: 722954a6b78ebe44efeb396bc745efa60f1207a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Projects::EnvironmentsController < Projects::ApplicationController
  layout 'project'
  before_action :authorize_read_environment!
  before_action :environment, only: [:show]

  def index
    @environments = project.environments
  end

  def show
  end

  private

  def environment
    @environment ||= project.environments.find(params[:id].to_s)
    @environment || render_404
  end
end