Skip to content

Instantly share code, notes, and snippets.

@hjkp
Created August 11, 2008 23:50
Show Gist options
  • Save hjkp/4969 to your computer and use it in GitHub Desktop.
Save hjkp/4969 to your computer and use it in GitHub Desktop.
class Monkey < Application
provides :html, :json
def index
@monkey_list = Monkey.list
display @node_list
end
def show
begin
@node = Monkey.load(params[:id])
rescue Net::HTTPServerException => e
raise NotFound, "Cannot load monkey #{params[:id]}"
end
display @monkey
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment