airbnb/rendr — pull request #285 by benjie (2014-02-03 10:22:48+00:00)
Title: Remove URL data attributes in clientSync('create')

Rough example
-------------

model = new RendrModel({parent_id:27, value:2})
model.url = "/parents/:parent_id"
model.save()

Should POST `{value:2}` to `/parents/27` but instead POSTs `{parent_id:27, value:2}`.

Explanation
-----------

`getUrl` removes the keys from `data` that are referenced by the URL; however if `options.data` is `undefined` (e.g. on 'create') then there's no key to remove until `addApiParams` is called (which does `model.toJSON()`).

Calling `addApiParams` before `getUrl` solves this, but I'm not sure if it has any negative consequences.