title: Check parent controller name in nested controller
body: <p>I am building a Rails 3.2 app.
  In this app I got two controllers sharing the same nested controller (transactions).</p>
  
  <p>The paths looks like this: </p>
  
  <pre><code>http://localhost:3003/admin/purchases/6/transactions
  </code></pre>
  
  <p>and like this</p>
  
  <pre><code>http://localhost:3003/admin/subscriptions/6/transactions
  </code></pre>
  
  <p>In the transactions index action, how can I check if the parent is either purchases or subscriptions?</p>