Show
Ignore:
Timestamp:
14-10-09 12:51:46 (5 years ago)
Author:
duh
Message:

improved debugcontroller

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      stacktrace.log
  • trunk/grails-app/controllers/DebugController.groovy

    r6 r7  
     1import grails.util.GrailsUtil 
     2 
    13/** 
    24 * Debug Controller 
     
    1416 */ 
    1517class DebugController { 
    16     def scaffold = true; 
    17     def index = { render('nothing to see here :)') } 
     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    } 
    1829}