summaryrefslogtreecommitdiff
path: root/app/controllers/projects/variables_controller.rb
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-01-03 17:57:55 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 14:51:18 -0600
commit58110293d4425c50a87975749551e069a02dc0cd (patch)
tree30df8e75fa51d1aa14002b05e2ed2fa806ca24d0 /app/controllers/projects/variables_controller.rb
parentee43dcd5d633f19b13a1d914a403686faec2bbca (diff)
downloadgitlab-ce-58110293d4425c50a87975749551e069a02dc0cd.tar.gz
Converted the views to partials that compose the menu item "pipelines"
Diffstat (limited to 'app/controllers/projects/variables_controller.rb')
-rw-r--r--app/controllers/projects/variables_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index 6f068729390..6e627224059 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
- @variable = Ci::Variable.new
+ redirect_to namespace_project_settings_pipelines_path(project.namespace, 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 namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variable was successfully updated.'
else
render action: "show"
end
@@ -25,7 +25,7 @@ class Projects::VariablesController < Projects::ApplicationController
@variable = Ci::Variable.new(project_params)
if @variable.valid? && @project.variables << @variable
- redirect_to namespace_project_variables_path(project.namespace, project), notice: 'Variables were successfully updated.'
+ redirect_to namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variables were successfully updated.'
else
render action: "index"
end
@@ -35,7 +35,7 @@ class Projects::VariablesController < Projects::ApplicationController
@key = @project.variables.find(params[:id])
@key.destroy
- redirect_to namespace_project_variables_path(project.namespace, project), notice: 'Variable was successfully removed.'
+ redirect_to namespace_project_settings_pipelines_path(project.namespace, project), notice: 'Variable was successfully removed.'
end
private