Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-04 01:51:34 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-02-06 23:51:19 +0300
commit44bb70c8c95fbee97661302e1279ed2c83f5d2e0 (patch)
tree6c8defb1cc25b0aa96df4b0f0de7df8b1ff4df86 /app/controllers/projects/variables_controller.rb
parentf3aaf906d488ee67ecd84f52febd0ce060fb7683 (diff)
Improved code styling on the variables_controller_spec
Also updated the #update action inside the variables controller as to render the show and not redirect back to the settings route
Diffstat (limited to 'app/controllers/projects/variables_controller.rb')
-rw-r--r--app/controllers/projects/variables_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index d07ef7889ca..2ebd8ccee70 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -15,11 +15,10 @@ class Projects::VariablesController < Projects::ApplicationController
@variable = @project.variables.find(params[:id])
if @variable.update_attributes(project_params)
- flash[:notice] = 'Variables were successfully updated.'
+ redirect_to namespace_project_variables_path(project.namespace, project), notice: 'Variable was successfully updated.'
else
- flash[:alert] = @variable.errors.full_messages.join(',').html_safe
+ render action: "show"
end
- redirect_to namespace_project_settings_ci_cd_path(project.namespace, project)
end
def create