[PATCH conductor 3/8] Added flash error message when launching a deployment
jprovazn at redhat.com
jprovazn at redhat.com
Thu Jun 14 13:36:30 UTC 2012
From: Jan Provaznik <jprovazn at redhat.com>
If partial launch (with errors) is allowed, the errors should be displayed
---
src/app/controllers/deployments_controller.rb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index 73eccce..0ae49a1 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -154,6 +154,9 @@ class DeploymentsController < ApplicationController
if @deployment.create_and_launch(current_session, current_user)
format.html do
flash[:notice] = t "deployments.flash.notice.launched"
+ if @deployment.errors.present?
+ flash[:error] = @deployment.errors.full_messages
+ end
redirect_to deployment_path(@deployment)
end
format.js { render :partial => 'properties' }
--
1.7.7.6
More information about the aeolus-devel
mailing list