# ActiveResource and a nested resource routes

**URL:** <https://www.ruby-forum.com/t/activeresource-and-a-nested-resource-routes/138423>\
**Category:** Rails\
**Created:** [May 22, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/activeresource-and-a-nested-resource-routes/138423 "2008-05-22T21:32:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [May 22, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/activeresource-and-a-nested-resource-routes/138423/1 "2008-05-22T21:32:48Z")

</div>

I have a nested resource in a Rails app, like this:

/users/:user\_id/actions/:id

I am trying to ActiveResource to access this resource remotely. Now if  
I name the model “Action” it will search the host for:

/actions/:id

So I need a dynamic prefix on the url, with an includes a user id. I  
see various methods in the docs about setting prefixes, but I am not  
sure exactly which to use and how to pass in the user id.

Anyone got a simple example?
