diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-07-06 20:10:07 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-07 15:35:12 +0900 |
commit | 8c434a52fcfc92ffbd8bf9aa5ee2893724d3c666 (patch) | |
tree | df3061c2d0cbbc4797e57cbe1c08f620a0950faf /app/controllers/groups | |
parent | 61d5b13888e9eb83cd86ca9849034d320b94d2b7 (diff) | |
download | gitlab-ce-8c434a52fcfc92ffbd8bf9aa5ee2893724d3c666.tar.gz |
gb nice catches
Diffstat (limited to 'app/controllers/groups')
-rw-r--r-- | app/controllers/groups/variables_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/groups/variables_controller.rb b/app/controllers/groups/variables_controller.rb index ece2ba62e0a..423f11e2234 100644 --- a/app/controllers/groups/variables_controller.rb +++ b/app/controllers/groups/variables_controller.rb @@ -20,13 +20,13 @@ module Groups end def create - new_variable = group.variables.create(group_params) + @variable = group.variables.create(group_params) + .present(current_user: current_user) - if new_variable.persisted? + if @variable.persisted? redirect_to group_settings_ci_cd_path(group), - notice: 'Variables were successfully updated.' + notice: 'Variable was successfully created.' else - @variable = new_variable.present(current_user: current_user) render "show" end end @@ -39,7 +39,7 @@ module Groups else redirect_to group_settings_ci_cd_path(group), status: 302, - notice: 'Failed to remove the variable' + notice: 'Failed to remove the variable.' end end |