diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-29 20:06:35 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-05 19:11:59 +0300 |
commit | fe13f110412d85c05dc68e5ee1db499f681bf722 (patch) | |
tree | 4a2d172bb5a490ac8cadbcf376fbf815393ef22b /app/controllers/projects/variables_controller.rb | |
parent | dc7939337e0d72d2391c3bbb3082d644a54195af (diff) |
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'app/controllers/projects/variables_controller.rb')
-rw-r--r-- | app/controllers/projects/variables_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb index 50e25a00f03..573d1c05622 100644 --- a/app/controllers/projects/variables_controller.rb +++ b/app/controllers/projects/variables_controller.rb @@ -4,7 +4,7 @@ class Projects::VariablesController < Projects::ApplicationController layout 'project_settings' def index - redirect_to namespace_project_settings_ci_cd_path(@project.namespace, @project) + redirect_to project_settings_ci_cd_path(@project) end def show @@ -15,7 +15,7 @@ class Projects::VariablesController < Projects::ApplicationController @variable = @project.variables.find(params[:id]) if @variable.update_attributes(project_params) - redirect_to namespace_project_variables_path(project.namespace, project), notice: 'Variable was successfully updated.' + redirect_to project_variables_path(project), notice: 'Variable was successfully updated.' else render action: "show" end @@ -26,7 +26,7 @@ class Projects::VariablesController < Projects::ApplicationController if @variable.valid? && @project.variables << @variable flash[:notice] = 'Variables were successfully updated.' - redirect_to namespace_project_settings_ci_cd_path(project.namespace, project) + redirect_to project_settings_ci_cd_path(project) else render "show" end @@ -36,7 +36,7 @@ class Projects::VariablesController < Projects::ApplicationController @key = @project.variables.find(params[:id]) @key.destroy - redirect_to namespace_project_settings_ci_cd_path(project.namespace, project), + redirect_to project_settings_ci_cd_path(project), status: 302, notice: 'Variable was successfully removed.' end |