[PATCH conductor] BZ#770902 - Deployment creation with blank entries displays The record you tried to access does not exists, it may have been deleted
Jozef Zigmund
jzigmund at redhat.com
Tue Feb 7 17:48:47 UTC 2012
On Thursday 12 January 2012 17:02:55 Tomas Hrcka wrote:
> ---
> src/app/controllers/deployments_controller.rb | 5 +++++
> src/app/views/deployments/_launch_new.html.haml | 2 +-
> src/config/locales/en.yml | 1 +
> 3 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/controllers/deployments_controller.rb
> b/src/app/controllers/deployments_controller.rb index a03ea4d..3fb128e
> 100644
> --- a/src/app/controllers/deployments_controller.rb
> +++ b/src/app/controllers/deployments_controller.rb
> @@ -56,6 +56,11 @@ class DeploymentsController < ApplicationController
>
>
> def launch_time_params
> + unless params.has_key?(:deployable_id)
> + flash[:error] =
> t('deployments.flash.warning.deployable_not_selected') + redirect_to
> launch_new_deployments_path(:pool_id => params[:deployment][:pool_id]) and
> return + end
> +
> @deployable = Deployable.find(params[:deployable_id])
> @deployment = Deployment.new(params[:deployment])
> @pool = @deployment.pool
> diff --git a/src/app/views/deployments/_launch_new.html.haml
> b/src/app/views/deployments/_launch_new.html.haml index d8e62f5..6403f76
> 100644
> --- a/src/app/views/deployments/_launch_new.html.haml
> +++ b/src/app/views/deployments/_launch_new.html.haml
> @@ -37,7 +37,7 @@
> %p
> %label{:for => 'frontend_realm_id'}
> = t('realms.index.realm')
> - = select :deployment, :frontend_realm_id, @realms.map{|r|
> [r.name, r.id]}, :include_blank => true + = select :deployment,
> :frontend_realm_id, @realms.map{|r| [r.name, r.id]}
>
> %fieldset.options
> = submit_tag t('.next'), :class => 'button', :id => "next_button"
> diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> index ad5f784..330ddda 100644
> --- a/src/config/locales/en.yml
> +++ b/src/config/locales/en.yml
> @@ -247,6 +247,7 @@ en:
> warning:
> disabled_pool: "Cannot launch a Deployment in this Pool. The pool
> has been disabled." failed_to_launch: "Deployment launch failed!"
> + deployable_not_selected: "You need to select deployable"
> error:
> not_launched: "Some assemblies will not be launched:"
> failed_to_launch_assemblies: "Failed to launch following
> assemblies:"
ACK, code works, but I revised code for actual staging and sent patch as reply
on your forgotten patch.
More information about the aeolus-devel
mailing list