Idea for nested routes
Reported by Nickolas Means | April 18th, 2008 @ 03:38 PM
Not sure this is a great idea, but I thought I'd at least throw it out there for discussion. For nested routes, it'd be hot if there was a way to build them out of nested blocks. For example:
route "post/" do
get :id do
haml :post
end
get "new" do
haml :post_form
end
post "new" do
Post.new(Params[:post])
haml :post
end
get self do
haml :post_list
end
end
I don't have the Ruby chops to pull it off yet, but I know you guys are having a hackfest this weekend so I thought I'd toss it out.
Comments and changes to this ticket
-
-
Victor Hugo Borja April 25th, 2008 @ 09:43 AM
Check the examples at http://github.com/vic/sinatra/co...
-
Blake Mizerany April 25th, 2008 @ 10:46 AM
Victor,
This is a bit to take in. I'll spend sometime looking into this weekend. I really like to see all those tests ;)
-
-
Ryan Tomayko September 7th, 2008 @ 06:40 PM
- → Milestone cleared.
- → Tag changed from to feature-request routes
Moving nested routes related tickets to 0.4
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
