Reputation: 1344
I am a newbie in rails and this question might sound very silly. I want to route all the links which start with the word 'GitRepos/' to one specific controller.
The links can be
GitRepos/Linux/Fedora/readme.txt
or
GitRepos/Linux/Ubuntu/config/lib/testing.md
In either of the cases I'd want my route to direct to Markdowns#view controller.
I have my routes as
match 'GitRepos/' =>'markdowns#view'
Upvotes: 0
Views: 279
Reputation: 29599
you can add the following to your route
match '/GitRepos/*path' => 'markdowns#view'
Upvotes: 1