mgonto/restangular — pull request #902 by leahciMic (2014-10-10 04:07:38+00:00)
Title: Add a test for nested resources from a `addRestangularMethod` result

This test identifies an issue I am currently having with `addRestangularMethod`.

Given the following code.

```js
var Accounts = Restangular.withConfig(function(RestangularConfigurer) {
RestangularConfigurer.addElementTransformer('users', true, function(worker) {
worker.addRestangularMethod('doSomething', 'get', 'do-something');
return worker;
});
}).service('accounts');

Accounts.doSomething().then(function(doSomething) {
doSomething.one('foo').get();
});
```

I would expect `doSomething.one('foo').get()` to fetch `accounts/do-something/foo`,
and not `accounts/foo`.