Changeset 178 for trunk/grails-app/controllers/SubAssemblyController.groovy
- Timestamp:
- Nov 2, 2009, 3:25:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SubAssemblyController.groovy
r118 r178 27 27 if(subAssemblyInstance) { 28 28 try { 29 subAssemblyInstance.delete( )29 subAssemblyInstance.delete(flush:true) 30 30 flash.message = "SubAssembly ${params.id} deleted" 31 31 redirect(action:list) … … 67 67 } 68 68 subAssemblyInstance.properties = params 69 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save( )) {69 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save(flush: true)) { 70 70 flash.message = "SubAssembly ${params.id} updated" 71 71 redirect(action:show,id:subAssemblyInstance.id) … … 77 77 else { 78 78 flash.message = "SubAssembly not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } … … 89 89 def save = { 90 90 def subAssemblyInstance = new SubAssembly(params) 91 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save( )) {91 if(!subAssemblyInstance.hasErrors() && subAssemblyInstance.save(flush: true)) { 92 92 flash.message = "SubAssembly ${subAssemblyInstance.id} created" 93 93 redirect(action:show,id:subAssemblyInstance.id)
Note: See TracChangeset
for help on using the changeset viewer.