backbone_extensions 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,16 +53,11 @@
|
|
53
53
|
|
54
54
|
function parseAssociation(associationType, associationName, options) {
|
55
55
|
function parseResponseWith(key, response) {
|
56
|
-
var
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
return {key: underscored, response: response[underscored]};
|
62
|
-
}
|
63
|
-
else {
|
64
|
-
return {response: null};
|
65
|
-
}
|
56
|
+
var parseKey;
|
57
|
+
return _([_.str.camelize, _.str.underscored]).any(function(fn) {
|
58
|
+
var k = fn(key);
|
59
|
+
return (parseKey = response[k] && {key: k, response: response[k]});
|
60
|
+
}) && parseKey || {response: null};
|
66
61
|
}
|
67
62
|
|
68
63
|
function through(response) {
|
@@ -114,7 +109,7 @@
|
|
114
109
|
this._parsers.push({
|
115
110
|
parseFn: parseFunc,
|
116
111
|
associationFn: function(assocResponse) {
|
117
|
-
associations[associationType].call(this, assocResponse, this[associationName](), mergeAssociationOptions(options, this.
|
112
|
+
associations[associationType].call(this, assocResponse, this[associationName](), mergeAssociationOptions(options, this._options));
|
118
113
|
}
|
119
114
|
});
|
120
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.7
|
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: -2212629205291919389
|
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: -2212629205291919389
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
141
|
rubygems_version: 1.8.24
|