resource 'posts/:id' do get do |id| # show post id end put do |id, post| # change post id, with the body params in "post" end delete do |id| # destroy post id end get 'comments' do |id| # show this post's comments end end