I have a route for querying "Service" model:
resources :services, :path => 'services'
When GET requests for path /services/sn-uber i take param sn(service name) and find it in database. How to add there another param like sd(service-district)?
For example /services/sn-uber/sd-brooklyn or /services/sd-brooklyn so any param could be omitted.
Add something like this to your routes:
Your url will look like:
/services/sn/uber/sd/brooklynsn_nameandsd_name/services/sn/ubersn_name/services/sd/brooklynsd_nameIf you want to keep your url like that
/services/sn-uber/sd-brooklyn: