Ruby Build a Rails API Coding the API Controller Actions and JSON Responses

How do you find the monkey ID?

Can't figure out the answer

monkeys_controller.rb
class Api::MonkeysController < ApplicationController
  def show
    @todo_list = TodoList.find(params[:id])
  end
end

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 57,532 Points

Hi there,

You're not dealing with TodoList in the challenge so change the class to Monkey. Something like this:

class Api::MonkeysController < ApplicationController
  def show
    @monkey = Monkey.find(params[:id])
  end
end

I hope that helps,

Steve.