I want to accept multiple routes in a single method.
resource :mypath do
helpers do
def mymethod
super_duper_stuff
end
end
post do
something_else
end
get do
mymethod
end
resource :subpath
post do
mymethod
end
end
end
Is there any way to combine a GET to /mypath and a POST to /mypath/subpath so I can put the code into the route method and not in the helpers section? Something like this:
resource :mypath do
post do
something_else
end
get, route(['POST'], "subpath") do
super_duper_stuff
end
end