Rails 3 routing how to match multiple?
问题 How do I match multiple controller for example an id? I have tried this in my routes: match '/:id' => 'kategoris#show' match '/:id' => 'tags#show' 回答1: Rails controller routing isn't appropriate for you if you're wanting to match http://example.com/<something> . You could create a single ThingsController: match '/:id' => 'things#show' and then do something appropriate in your ThingsController. Eg. in Sinatra (which you could mount as a Rack middleware) you'd do this: get "/:id" do :id if(@tag