title: Ruby on Rails 4.0 Shared Engine
body: <p>Currently in my app, there is an engine that is being shared by two name spaces.
  /c/engine
  and
  /p/engine</p>
  
  <p>How could I differentiate between whether it is used in C or P? Are there any params I could set in the route file? At the moment I am mounting it twice (which I found doesn't really do anything) at c and p namespace. Current solution is to match the request URL, but that seems a bit hacky</p>
  
  <p>Any advice is appreciated. Thanks!</p>
  
  <p>Edit: This is causing problems where a user would post a url to direct them straight to c/engine/id, or p/engine/id, we need to set variables base on if it's c or p before they even perform any action.</p>