title: Active Resource in Rails 3.0, nested resource with non standard ID
body: <p>I have a rails application that needs to refer to another rails application to populate some of it's models, and am using Active Resource to do it.</p>
  
  <p>When I need to hit a route like:</p>
  
  <pre><code>/channels.xml
  </code></pre>
  
  <p>There is no problem at all, I can use the automatic mapping just fine...</p>
  
  <p>But, I ALSO need to be able to handle a route like:</p>
  
  <pre><code>/channels/1/programs.xml
  </code></pre>
  
  <p>And this is where I'm stuck.</p>
  
  <p>Just looking at the docs, it LOOKS like this might count as a custom restful route, in which case I would be stuck doing the horribly messy looking:</p>
  
  <pre><code>Channel.first.get(:programs)
  </code></pre>
  
  <p>Which not only looks terrible, ALSO does not work (the rails app that actually has the data sees</p>
  
  <pre><code>/channels//programs.xml
  </code></pre>
  
  <p>with no id in there.  Which, you know, is cool since things get even MORE complicated and the "Channel" model in that other rails object is being built from a legacy database that doesn't have rails in mind (and hence no "id" column).  Instead, it uses "station_id".</p>
  
  <p>So, if I HAVE to use that messy Channel.get method, how can I make sure it sets the id correctly?  CAN I do this from the ActiveResource app, or is there something I need to change in the source rails app?</p>
  
  <p>Edit: Just in case someone suggests it, I HAVE tried Channel.first.get(:programs, :id => 1) but that just gets me a route like:</p>
  
  <p>/channels//programs.xml?id=1.</p>
  
  <p>Maybe I'll have to abandon restful routes and just pull the id from there....but I really don't want to...</p>