I am trying to use a subclass style in a Sinatra application. So, I have a main application like this.
class MyApp < Sinatra::Base get '/' end ... end class AnotherRoute < MyApp get '/another' end post '/another' end end
run Rack::URLMap.new \ "/" => MyApp.new, "/another" => AnotherRoute.new
In config.ru, I understand that it is only for "GET" as about other resources (for example, "PUT", "POST")? I'm not sure I'm missing the obvious. And also, if I have ten paths (/ path1, / path2, ...), do I need to configure them all in config.ru, even if they are in the same class?
source share