backbone_extensions 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
@@ -70,10 +70,10 @@
|
|
70
70
|
if (options.parse) {
|
71
71
|
var associations = {
|
72
72
|
hasMany: function(assocResponse, association, newOptions) {
|
73
|
-
association.add(_(assocResponse).
|
73
|
+
association.add(_(assocResponse).compact(), newOptions);
|
74
74
|
},
|
75
75
|
hasOne: function(assocResponse, association, newOptions) {
|
76
|
-
association.clear({silent: true}).set(
|
76
|
+
association.clear({silent: true}).set(assocResponse, newOptions);
|
77
77
|
}
|
78
78
|
};
|
79
79
|
|
@@ -107,8 +107,9 @@
|
|
107
107
|
|
108
108
|
this._parsers.push({
|
109
109
|
parseFn: parseFunc,
|
110
|
-
associationFn: function(
|
111
|
-
|
110
|
+
associationFn: function(response) {
|
111
|
+
var association = this[associationName]();
|
112
|
+
return associations[associationType].call(this, association.parse(response), association, mergeAssociationOptions(options, this._options));
|
112
113
|
}
|
113
114
|
});
|
114
115
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backbone_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
segments:
|
128
128
|
- 0
|
129
|
-
hash:
|
129
|
+
hash: 1033708220958971973
|
130
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
131
|
none: false
|
132
132
|
requirements:
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
segments:
|
137
137
|
- 0
|
138
|
-
hash:
|
138
|
+
hash: 1033708220958971973
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
141
|
rubygems_version: 1.8.24
|