Skip to content

Instantly share code, notes, and snippets.

@kitop kitop/app.rb
Created Apr 11, 2014

Embed
What would you like to do?
nested routes
Cuba.define do
on "posts" do
run Posts
end
end
class Posts < Cuba
define do
on ":id" do |id|
post = Post[id]
# some methods
on "comments" do
run Comments
end
end
end
end
class Comments < Cuba
define do
# some routes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.