Removing an element from a list isn't working, which doesn't make any sense. Am I missing some special semantics peculiar to dealing with a Grails domain object list?
In controller:
def userCreate = {
def workgroupInstance = new Workgroup()
workgroupInstance.manager = authUserDomain
flash.message = User.list().toString()
def usersWithoutThisOne = User.list() - authUserDomain
flash.message = flash.message + "removed ${authUserDomain}, new list is ${usersWithoutThisOne}"
return ['workgroupInstance':workgroupInstance, 'users':usersWithoutThisOne]
}
Results in this being displayed in flash.message
[boogie, toogie, choogie, cookie]removed boogie, new list is [boogie, toogie, choogie, cookie]