Skip to content

Instantly share code, notes, and snippets.

@MichaelAstreiko
Created April 8, 2012 19:11
Show Gist options
  • Save MichaelAstreiko/2339348 to your computer and use it in GitHub Desktop.
Save MichaelAstreiko/2339348 to your computer and use it in GitHub Desktop.
Simple render REST
def user = User.get(params.id)
render(contentType:'text/json'){
user{
username(user.username)
birthday(user.birthday)
firstName(user.firstName)
lastName(user.lastName)
city(user.city)
....
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment