title: CakePHP autorender not stopping default view
body: <p>I'm trying to run a method in a controller that renders the default view on a normal browser, but renders a mobile view when the request is coming from a mobile device.</p>
  
  <p>In app_controller.php</p>
  
  <pre><code>function beforeFilter() { 
      if ($this-&gt;RequestHandler-&gt;isMobile()) {
          $this-&gt;is_mobile = true;
          $this-&gt;set('is_mobile', true );
          $this-&gt;autoRender = false;
      }
  }
  </code></pre>
  
  <p>and in the controller:</p>
  
  <pre><code>function home(){    
      ...bunch of data grabbing stuff...
  
      if ($this-&gt;is_mobile){
          $this-&gt;autoRender = NULL;
          $this-&gt;layout = 'empty';
          $this-&gt;render('/mobile/home');
      } else {
          $this-&gt;layout = 'default';
      }
  }
  </code></pre>
  
  <p>When i hit it on a browser (user agent switched to mobile device) it renders the proper mobile/home view file, BUT it ALSO renders the normal, non-mobile view file underneath. Turned on debug, nothing out of the ordinary, except the 2nd, 'normal' view file is being rendered underneath the mysql trace from the mobile view.</p>
  
  <p>Any thoughts on how to fully disable the default view from rendering and just showing the mobile?</p>