rstacruz / sinatra-backbone

Neat Backbone.js integration with Sinatra.
http://ricostacruz.com/sinatra-backbone
72 stars 10 forks source link

Does not function properly with sinatra namespaces #4

Open bradherman opened 12 years ago

bradherman commented 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.

pmn4 commented 10 years ago

a little late, but :+1: