viezel/napp.alloy.adapter.restapi — pull request #36 by wrightlabs (2014-05-25 02:59:08+00:00)
Title: If params.url comes from model.url() errors occur

(hello and great adapter!)

In my usage of this I have setup nested models/collections.
For some of these, the model.config.URL cannot be used and is not there.
(For instance 'http://myapi.com/v1/users/20/contacts' )

But my models do produce the correct url with the model.url() call.

The problem is without the changes I've proposed here my urls are as follows...
create -> http://myapi.com/v1/users/20/contacts (correct)
read -> http://myapi.com/v1/users/20/contacts/30/30 (incorrect)
update -> http://myapi.com/v1/users/20/contacts/30/30 (incorrect)
delete -> http://myapi.com/v1/users/20/contacts/30/30 (incorrect)

This pull request fixes the issue for me. I don't know if this is the best way to fix the problem, but I used this pull request to share the issue.