Shopify/batman — pull request #522 by hornairs (2012-08-16 20:14:25+00:00)
Title: Relative and absolute model urls

`RestStorage` and offspring `RailsStorage` let you define the URL for collection or record endpoint by optionally defining for example `Product.url` and `Product::url` respectively. These two properties can be either functions which calculate the URL dynamically or just a string. The final URL that gets hit before this change always had the `urlPrefix` and `urlSuffix` options prepended and appended to the URL, which is the mechanism by which all our API calls end up underneath `/admin` and end in `.json`.

Now, if one of the `url` functions resolves to something beginning with a "/", the URL prefix is not prepended, and if it does not begin with a "/", then the URL prefix will be appended. Also, if the URL prefix does not end in a "/", one will be appended.

@nciagra @jamesmacaulay for review please!