In the basic CRUD model, from the create view, I have the following code to save an item:
println params
def newItem = new ProgressItem(name: params.name, comment: params.comment, status: params.status, itemsGroup: params.itemsGroup); //add itemsGroup: based on itemsGroup.id
newItem.save()
redirect(controller:'project', action:'show', id:params.itemsGroup.id) //change '1'
But it doesn’t work, that is, when I am back at the project page there isn’t another progress item added.
Here are the params that print out:
[status:FAILED, name:FF FF FF FF FF FF FF, itemsGroup.id:1, itemsGroup:[id:1], comment:FF FF FF FF FF FF FF, create:Create, action:save, controller:progressItem]
I don’t get any errors…
If instead of
you do:
Does it print out what was wrong?