Changeset 387 for trunk/grails-app/services
- Timestamp:
- Feb 18, 2010, 8:10:41 PM (15 years ago)
- Location:
- trunk/grails-app/services
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/AssetService.groovy
r360 r387 1 2 import org.apache.commons.lang.WordUtils 3 1 4 class AssetService { 2 5 … … 116 119 result.assetInstance = new Asset(params) 117 120 121 use(WordUtils) { 122 result.assetInstance.name = result.assetInstance.name.capitalize() 123 result.assetInstance.description = result.assetInstance.description.capitalize() 124 } 125 118 126 if(result.assetInstance.hasErrors() || !result.assetInstance.save(flush: true)) 119 127 return fail(code:"default.create.failure") -
trunk/grails-app/services/AssetSubItemService.groovy
r360 r387 1 2 import org.apache.commons.lang.WordUtils 3 1 4 class AssetSubItemService { 2 5 … … 93 96 result.assetSubItemInstance = new AssetSubItem(params) 94 97 98 use(WordUtils) { 99 result.assetSubItemInstance.name = result.assetSubItemInstance.name.capitalize() 100 result.assetSubItemInstance.description = result.assetSubItemInstance.description.capitalize() 101 } 102 95 103 if(params.asset?.id) { 96 104 result.assetInstance = Asset.get(params.asset.id)
Note: See TracChangeset
for help on using the changeset viewer.