Ignore:
Timestamp:
Feb 18, 2010, 8:10:41 PM (10 years ago)
Author:
gav
Message:

Capitalise asset and sub items during creation and update.
Small correction to alt menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/AssetService.groovy

    r360 r387  
     1
     2import org.apache.commons.lang.WordUtils
     3
    14class AssetService {
    25
     
    116119        result.assetInstance = new Asset(params)
    117120
     121        use(WordUtils) {
     122            result.assetInstance.name = result.assetInstance.name.capitalize()
     123            result.assetInstance.description = result.assetInstance.description.capitalize()
     124        }
     125
    118126        if(result.assetInstance.hasErrors() || !result.assetInstance.save(flush: true))
    119127            return fail(code:"default.create.failure")
Note: See TracChangeset for help on using the changeset viewer.