Slide 13
Slide 13 text
# padrino style
controller :dogs do
get :leash, :with => :id do
# grab hold of the leash
end
put :leash, :with => [:id, :leash_id]
# place the leash on the dog
end
End
# renders
Application: Foo
URL REQUEST PATH
(:dogs, :leash) GET /dogs/leash/:id
(:dogs, :leash) PUT /dogs/leash/:id/:leash_id
Predict that route!