#8 √ hold
Nickolas Means

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

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 »