Reputation: 25110
I've got a rails application it contains web interface and api.
I want to rewrite api using sinatra. I want all requests to "/api/..." to be handled by sinatra and ignored by rails.
Is that possible?
Upvotes: 5
Views: 750
Reputation: 20724
Yes it is possibile. See mount. With that you can do something like:
FooApp::Application.routes.draw do root :to => 'welcome#index' mount FooAppApi => "/api" end
Upvotes: 9