Sunday, August 18, 2013

Grails Learnings

To log something use the following:
log.info('In the index action...')
For example:
class SampleController { def index() { log.info('In the index action...') // ... } }
Multiple constraints for the same field are done like this:
static constraints = { bagId(blank: false) barcode(blank: false, matches:/[0-9]/)

No comments: