new Model()
Skull.Model is basic model with few enhancements:
- registry handling
- meaningful cid
- easier REST urls generation (when
resource
field provided)
Extends
- Backbone.Model
Members
_parentResult :function
Type:
- function
Methods
clone() → {Skull.Model}
Overridden for registry handling
Returns:
- Type
- Skull.Model
silentSet(key, valopt, optionsopt)
Almost the same as .set method, but always do it's work silently (i.e. not firing any event). Useful when setting values from UI to prevent «event loop».
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
Object | String | Either key or properties hash |
||
val |
Object |
<optional> |
Either value or options |
|
options |
Object |
<optional> |
{} | Additional options |
sync() → {jQuery.Deferred}
Delegates sync operations to this.syncer
Returns:
- Type
- jQuery.Deferred
toTemplate() → {Object}
toTemplate is reserved for generating data for rendering, e.g. for computed values and so on. Feel free to override.
Returns:
- Type
- Object