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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-05 15:27:06 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-05-19 23:01:53 +0300
commitdd8e9e2d7acf05b837a3bacd1258e9f3df4254a6 (patch)
tree3fad55f3a63506350711908260da20ca59c8d9cb /app/controllers/projects/runners_controller.rb
parent9129c37c5bd6e648e23ebe6847b909dd151c7e8a (diff)
Add custom validator to runner model
Diffstat (limited to 'app/controllers/projects/runners_controller.rb')
-rw-r--r--app/controllers/projects/runners_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb
index 3a9d67aff64..12172b47520 100644
--- a/app/controllers/projects/runners_controller.rb
+++ b/app/controllers/projects/runners_controller.rb
@@ -20,7 +20,8 @@ class Projects::RunnersController < Projects::ApplicationController
if @runner.update_attributes(runner_params)
redirect_to runner_path(@runner), notice: 'Runner was successfully updated.'
else
- redirect_to runner_path(@runner), alert: 'Runner was not updated.'
+ flash[:alert] = @runner.errors.full_messages.to_sentence
+ render 'edit'
end
end