Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Commit ce4199b

Browse files
authored
Merge pull request #156 from paaddyy/master
Add options to model creation
2 parents bec21af + 743f61d commit ce4199b

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.4.2 / 2017-07-30
2+
3+
* Merge #156: Pass options to model creation - supports integration in systems with custom backbone models (@paaddyy)
4+
15
### 1.4.1 / 2016-04-18
26

37
* Fix #145: Prevent model's id from being nulled (and saved locally with that id) when an offlineStatusCode is returned; broken since 1.4.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Backbone dualStorage Adapter v1.4.1
1+
Backbone dualStorage Adapter v1.4.2
22
===================================
33

44
A dualStorage adapter for Backbone. It's a drop-in replacement for Backbone.Sync() to handle saving to a localStorage database as a cache for the remote models.

backbone.dualstorage.amd.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backbone.dualstorage.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###
2-
Backbone dualStorage Adapter v1.4.1
2+
Backbone dualStorage Adapter v1.4.2
33
44
A simple module to replace `Backbone.sync` with *localStorage*-based
55
persistence. Models are given GUIDS, and saved into a JSON object. Simple
@@ -303,7 +303,7 @@ dualsync = (method, model, options) ->
303303
if model
304304
responseModel = modelUpdatedWithResponse(model, modelAttributes)
305305
else
306-
responseModel = new collection.model(modelAttributes)
306+
responseModel = new collection.model(modelAttributes, options)
307307
localsync('update', responseModel, options)
308308
else
309309
responseModel = modelUpdatedWithResponse(model, resp)

backbone.dualstorage.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Backbone.dualStorage",
33
"main": "backbone.dualstorage.js",
4-
"version": "1.4.1",
4+
"version": "1.4.2",
55
"homepage": "https://github.com/nilbus/Backbone.dualStorage",
66
"authors": [
77
"Edward Anderson <nilbus@nilbus.com>",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Backbone.dualStorage",
33
"main": "backbone.dualstorage.js",
4-
"version": "1.4.1",
4+
"version": "1.4.2",
55
"homepage": "https://github.com/nilbus/Backbone.dualStorage",
66
"authors": [
77
"Edward Anderson <nilbus@nilbus.com>",

spec/backbone.dualstorage.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)