title: Questions on nested resources in Ruby on Rails
body: <p>How can I specify a custom action for a nested URL in ruby on rails? For example, I have two resources people and book. In the book controller, I have a custom action, say foo_action. I am wonder how can I use nested resources in ruby on rails to specify something like: </p>
  
  <pre><code>people/10/book/foo_action/20
  </code></pre>
  
  <p>basically, <strong>call the foo_action associated with book 20 which belongs to people 10</strong>. (people and book are one-to-many relations).</p>
  
  <p>Thanks a lot.</p>