I copied it and later while testing it slipped. I will remove the “.now”.

On 1 May 2014, at 11:03, David Somers <notifications@github.com> wrote:

> In app/controllers/admin/cms/base_controller.rb:
> 
> > @@ -29,7 +29,12 @@ def current_ability
> >    end
> >  
> >    rescue_from CanCan::AccessDenied do |exception|
> > -    redirect_to admin_cms_path, :alert => exception.message
> > +    if ::Cms::Site.accessible_by(current_ability).exists?
> > +      flash.now[:alert] = 'You are not authorized to access this page.'
> Why is this a flash.now when there is a redirect? I think flash.now should only be used if you are going to immediately render.
> 
> —
> Reply to this email directly or view it on GitHub.
>