I would like to handle multiple URLs with one route code.
I am trying something like this:
get '/company', '/about' do
...
end
but it does not work. For /company, I get 200, but for /about, I get 404.
Is there such way to do this?
I would like to handle multiple URLs with one route code.
I am trying something like this:
get '/company', '/about' do
...
end
but it does not work. For /company, I get 200, but for /about, I get 404.
Is there such way to do this?
Copyright © 2021 Jogjafile Inc.
The route file is a ruby file. You can do this with a simple loop:
From the source code:
You can see that the
getmethod only takes a single path.