title: How do I perform specific parentless requests using Restangular in a neat way?
body: <p>Say I have an API endpoint at <code>/users</code> and another one at <code>/cars</code>. Naturally, a <code>GET</code> request to either of them will get all users or cars available. Now, a <code>GET /users/74/cars</code> should return all cars belonging to user 74. </p>
  
  <p>But my app has many models related to cars, not just users, so more endpoints exist like <code>/shops/34/cars</code> and <code>/mechanics/12/cars</code>. For simplicity, I want all <code>PUT/PATCH</code> requests to be made to the main <code>/cars</code> endpoint.</p>
  
  <p>At the moment of performing the save, Restangular will by default do a <code>PUT</code> request to the endpoint through which the item was loaded. But that endpoint do not exist.</p>
  
  <p>It also provides a nice <code>Restangular.setParentless(['cars'])</code> method that will discard the first part of the url. However, I don't want to do this globally, but specifically for a particular element.</p>
  
  <p>The neatest would actually do it globally, but restrict it for a specific method, like: <code>Restangular.setParentless(['cars'], ['PUT'])</code>. </p>
  
  <p>Anything like that around? Or am I overcomplicating it?</p>
  
  <p>So far I tried stuff I don't like:</p>
  
  <pre><code>delete car.parentResource;
  </code></pre>