Quantcast
Channel: User Ciprian Tarta - Stack Overflow
Viewing all articles
Browse latest Browse all 31

Rails routing resource in namespace starting with a parameter

$
0
0

I have 2 namespaces, api and v1I have accounts and users as resources.

I want to map the routing as follows for all my resources:

/api/v1/:account_id/:resource/:id

i.e:/api/v1/1/users/2

In the example 1 stands for account id and 2 stands for user id.

How do I accomplish this?


Viewing all articles
Browse latest Browse all 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>