Created
August 11, 2008 23:50
-
-
Save hjkp/4969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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