maccman/spine — pull request #244 by vaskas (2012-03-29 15:32:30+00:00)
Title: Allow setting different hosts for different Ajax models.

This makes sense for applications that interact with multiple backend services.

```coffeescript
class App.User extends Spine.Model
@extend Spine.Model.Ajax
@host = -> App.Configuration.host 'api'

class App.Message extends Spine.Model
@extend Spine.Model.Ajax
@host = -> App.Configuration.host 'messaging'
```

`host` as a function gets us a dynamic value that can be based on some current configuration (that might, for instance, get downloaded, fetched from localStorage or modified by the user).