Skip to content

Instantly share code, notes, and snippets.

@quanganhdo
Created September 1, 2009 06:55
Show Gist options
  • Select an option

  • Save quanganhdo/178948 to your computer and use it in GitHub Desktop.

Select an option

Save quanganhdo/178948 to your computer and use it in GitHub Desktop.
<?php
class AppController extends Controller {
var $components = array('RequestHandler');
function beforeRender() {
if ($this->RequestHandler->isAjax() || $this->layout == 'ajax') {
Configure::write('debug', 0);
} else {
Configure::write('debug', 2);
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment