Reputation: 20815
I am creating an API similar to that of Flickr's and I am having some problems with on of the routes. I need something the following to all be routed to the same controller/action:
Upvotes: 0
Views: 65
Reputation: 1643
if you're trying to pass photos, comments etc as variables then
match 'services/api/:photos/:comments' => 'controller#method'
but I'm not sure what you're quite trying to do. It would seem to make more sense, assuming you are passing these as values, to put the getList and search as separate methods
match 'services/api/getList/:photos/:comments' => 'controller#getList'
match 'services/api/search/:photos/:comments' => 'controller#search'
Upvotes: 2