diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-31 19:04:30 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-31 19:04:30 +0300 |
commit | 933cfe1e0c493964052b664c2426a90f845f0042 (patch) | |
tree | 380a6add985803aec64c107dba21ba9c842aea44 /app/controllers | |
parent | c854460e13259cce112e9308259714390dc9b405 (diff) |
Add environment instance var to BlobController#show html resp
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index fee74725d6c..721e174d587 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -39,6 +39,9 @@ class Projects::BlobController < Projects::ApplicationController respond_to do |format| format.html do assign_ref_vars + + environment_params = @repository.branch_exists?(@ref) ? { ref: @ref } : { commit: @commit } + @environment = EnvironmentsFinder.new(@project, current_user, environment_params).execute.last @last_commit = @repository.last_commit_for_path(@commit.id, tree.path) || @commit show_new_repo? ? render('projects/tree/show') : render('show') |