Open bradherman opened 12 years ago
http://www.sinatrarb.com/contrib/namespace.html
Would be nice to be able to namespace the rest routes from RestApi:
namespace '/api' do namespace '/v1' do rest_resource '/book/:id' do |id| book = Book.get(id) book.to_json end end end
for a route: "mysite.com/api/v1/book/1"
Right now using w/ namespace ignores the namespace and serves up the /book/1 from root only and we get a 404 on the api/v1/book/id route.
a little late, but :+1:
http://www.sinatrarb.com/contrib/namespace.html
Would be nice to be able to namespace the rest routes from RestApi:
for a route: "mysite.com/api/v1/book/1"
Right now using w/ namespace ignores the namespace and serves up the /book/1 from root only and we get a 404 on the api/v1/book/id route.