Ignore:
Timestamp:
Oct 22, 2009, 4:33:25 PM (15 years ago)
Author:
gav
Message:

Add costCode attribute to Asset and regen non-detailed controller and views, adjust detailed views to suite.

Location:
trunk/grails-app/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/AssetController.groovy

    r118 r161  
    2727        if(assetInstance) {
    2828            try {
    29                 assetInstance.delete()
     29                assetInstance.delete(flush:true)
    3030                flash.message = "Asset ${params.id} deleted"
    3131                redirect(action:list)
     
    7777        else {
    7878            flash.message = "Asset not found with id ${params.id}"
    79             redirect(action:edit,id:params.id)
     79            redirect(action:list)
    8080        }
    8181    }
  • trunk/grails-app/controllers/AssetDetailedController.groovy

    r156 r161  
    4848        if(assetInstance) {
    4949            try {
    50                 assetInstance.delete()
     50                assetInstance.delete(flush:true)
    5151                flash.message = "Asset ${params.id} deleted"
    5252                redirect(action:search)
     
    103103        else {
    104104            flash.message = "Asset not found with id ${params.id}"
    105             redirect(action:edit,id:params.id)
     105            redirect(action:list)
    106106        }
    107107    }
Note: See TracChangeset for help on using the changeset viewer.