Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save osscontributor/f10008e8428c50173c3e7e68572ace48 to your computer and use it in GitHub Desktop.
Save osscontributor/f10008e8428c50173c3e7e68572ace48 to your computer and use it in GitHub Desktop.
// I don't think there are scenarios where this is the best thing to do...
def donors = Donor.createCriteria().list(){
eq('event', event)
}
if(params.sort == "firstName"){
if(params.order == "asc"){
donors.sort {it.firstName}
} else {
Collections.reverse(donors.sort {it.firstName})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment