Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person {
- String firstName
- String lastName
- String fullName(){
- return "$firstName $lastName"
- }
- }
- class PersonController {
- def show(){
- respond Person.get(params.id)
- }
- }
- model {
- Person person
- }
- json {
- lastName person.lastName
- firstName person.firstName
- //fullName person.fullName() -- this line doesn't compile
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement