[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 19:22:49 UTC 2012


On Fri, Feb 10, 2012 at 01:58:22PM -0500, Matt Wagner wrote:
> 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.

Oh, since it's past end of day for you, I've pushed to the staging repo
-- 359ec8b3c12e2812cf1ccba728a5f2ae8759375f

I'll update the BZ too.

-- Matt



More information about the aeolus-devel mailing list