I'm getting error despite of addding render json: @monkey.as_json(include::bananas)
for the following question i'm adding above code as an answer but its giving an error
Let's make sure when we call monkey, we can see all the bananas she has. Change the code below to use as_json to include bananas in the JSON render. Hint: We're only including one thing, so this does not need an array!
Got it . @monkey.as_json(include: :bananas) is the correct code .there's a space between "::"