root/trunk/grails-app/controllers/DebugController.groovy @ 7

Revision 7, 0.7 KB (checked in by duh, 5 years ago)

improved debugcontroller

  • Property svn:keywords set to Date Author Rev
Line 
1import grails.util.GrailsUtil
2
3/**
4 * Debug Controller
5 * @Author  Jeroen Wesbeek
6 * @Since   20091014
7 * @Description
8 *
9 * If all controllers extend this debug controller in one piece of code the
10 * behaviour of the other controllers can be -to some extent- manipulated.
11 *
12 * Revision information:
13 * $Rev$
14 * $Author$
15 * $Date$
16 */
17class DebugController {
18    /**
19     * Turn scaffolding on or off
20     */
21    def scaffold = (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT && this.class.name != 'DebugController');
22
23    /**
24     * Render output to the browser, overload this method to suit your needs
25     */
26    def index = {
27        render(sprintf("%s @ %s environment :: nothing to see here! :)",this.class.name,GrailsUtil.environment));
28    }
29}
Note: See TracBrowser for help on using the browser.