[PATCH aeolus-conductor] BZ#789102 Default to first catalog of deployable if catalog not set
Matt Wagner
matt.wagner at redhat.com
Fri Feb 10 18:58:22 UTC 2012
On Fri, Feb 10, 2012 at 06:20:07PM +0000, mtaylor at redhat.com wrote:
> From: Martyn Taylor <mtaylor at redhat.com>
>
> ---
> src/app/controllers/deployables_controller.rb | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
> index cf5c6b0..4e4404f 100644
> --- a/src/app/controllers/deployables_controller.rb
> +++ b/src/app/controllers/deployables_controller.rb
> @@ -59,7 +59,7 @@ class DeployablesController < ApplicationController
>
> def show
> @deployable = Deployable.find(params[:id])
> - @catalog = Catalog.find(params[:catalog_id]) if params[:catalog_id].present?
> + @catalog = params[:catalog_id].present? ? Catalog.find(params[:catalog_id]) : @deployable.catalogs.first
> require_privilege(Privilege::VIEW, @deployable)
> save_breadcrumb(polymorphic_path([@catalog, @deployable]), @deployable.name)
> @providers = Provider.all
> --
> 1.7.6.4
ACK! Thanks for this. Works e2e and all tests pass.
-- Matt
More information about the aeolus-devel
mailing list