parent
89edb5e07a
commit
4fa8b1df60
@ -1,7 +1,9 @@
|
|||||||
class PeopleController < ApplicationController
|
class PeopleController < ApplicationController
|
||||||
def index
|
def index
|
||||||
# render({ :json => { :message => 'hi', :status => 200 } })
|
render json: [
|
||||||
# render json: message: 'hi', status: 200 # doesn't work because nested objects are unguessable
|
{ name: 'Joey', age:12 },
|
||||||
render json: { message: 'hi', status: 200 }
|
{ name: 'Sarah', age:52 },
|
||||||
|
{ name: 'Cthulhu', age: 8000 }
|
||||||
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in new issue