[PATCH conductor] BZ807462: Fix filter view detection

Matt Wagner matt.wagner at redhat.com
Wed Mar 28 17:29:28 UTC 2012


On Wed, Mar 28, 2012 at 01:14:00PM -0400, Matt Wagner wrote:
> On Wed, Mar 28, 2012 at 05:23:58PM +0200, ifarkas at redhat.com wrote:
> > From: Imre Farkas <ifarkas at redhat.com>
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=807462
> > ---
> >  src/app/controllers/application_controller.rb |   13 +++++++++----
> >  1 files changed, 9 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
> > index 0fc0094..db471ba 100644
> > --- a/src/app/controllers/application_controller.rb
> > +++ b/src/app/controllers/application_controller.rb
> > @@ -126,10 +126,12 @@ class ApplicationController < ActionController::Base
> >  
> >    # let's suppose that 'pretty' view is default
> >    def filter_view?
> > -    if @viewstate
> > -      @viewstate.state['view'] == 'filter'
> > -    else
> > +    if params[:view].present?
> >        params[:view] == 'filter'
> > +    elsif params[:details_tab].present?
> > +      true
> > +    elsif @viewstate
> > +      @viewstate.state['view'] == 'filter'
> >      end
> >    end
> >  
> > @@ -228,11 +230,14 @@ class ApplicationController < ActionController::Base
> >    end
> >  
> >    def clear_breadcrumbs
> > +    return if request.format == :json
> > +
> >      session[:breadcrumbs] = []
> > -    session[:viewstates] = {}
> >    end
> >  
> >    def save_breadcrumb(path, name = controller_name)
> > +    return if request.format == :json
> > +
> >      session[:breadcrumbs] ||= []
> >      breadcrumbs = session[:breadcrumbs]
> >      viewstate = @viewstate ? @viewstate.id : nil
> > -- 
> > 1.7.6.5
> 
> This appears to work, but I seem to be encountering a Cucumber failure:
> features/authentication.feature:37
> 
> I'm going to see if that passes on master, since it's not clear how your
> patch could have broken it. Will keep you posted.
> 

Okay, I can't reproduce this test failure to save my life, so I'm going
to ACK this.

-- Matt



More information about the aeolus-devel mailing list