Skip to content

Commit 269f05f

Browse files
committed
Remove ds-links-in-record-array feature flag
1 parent 9593e17 commit 269f05f

3 files changed

Lines changed: 33 additions & 38 deletions

File tree

addon/-private/system/record-arrays/adapter-populated-record-array.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ export default RecordArray.extend({
5252
meta: cloneNull(payload.meta)
5353
});
5454

55-
if (isEnabled('ds-links-in-record-array')) {
56-
this.set('links', cloneNull(payload.links));
57-
}
55+
this.set('links', cloneNull(payload.links));
5856

5957
internalModels.forEach((record) => {
6058
this.manager.recordArraysForRecord(record).add(this);

config/features.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"ds-improved-ajax": true,
44
"ds-pushpayload-return": null,
55
"ds-extended-errors": null,
6-
"ds-links-in-record-array": true,
76
"ds-overhaul-references": null,
87
"ds-payload-type-hooks": null,
98
"ds-check-should-serialize-relationships": null,

tests/unit/adapter-populated-record-array-test.js

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -104,43 +104,41 @@ test("stores the metadata off the payload", function(assert) {
104104
assert.equal(recordArray.get('meta.foo'), 'bar', 'expected meta.foo to be bar from payload');
105105
});
106106

107-
if (isEnabled('ds-links-in-record-array')) {
108-
test('stores the links off the payload', function(assert) {
109-
var recordArray = store.recordArrayManager
110-
.createAdapterPopulatedRecordArray(store.modelFor('person'), null);
111-
var payload = {
112-
data: [{
113-
type: 'person',
114-
id: '1',
115-
attributes: {
116-
name: 'Scumbag Dale'
117-
}
118-
}, {
119-
type: 'person',
120-
id: '2',
121-
attributes: {
122-
name: 'Scumbag Katz'
123-
}
124-
}, {
125-
type: 'person',
126-
id: '3',
127-
attributes: {
128-
name: 'Scumbag Bryn'
129-
}
130-
}],
131-
links: {
132-
first: '/foo?page=1'
107+
test('stores the links off the payload', function(assert) {
108+
var recordArray = store.recordArrayManager
109+
.createAdapterPopulatedRecordArray(store.modelFor('person'), null);
110+
var payload = {
111+
data: [{
112+
type: 'person',
113+
id: '1',
114+
attributes: {
115+
name: 'Scumbag Dale'
133116
}
134-
};
135-
136-
run(function() {
137-
var records = store.push(payload);
138-
recordArray.loadRecords(records, payload);
139-
});
117+
}, {
118+
type: 'person',
119+
id: '2',
120+
attributes: {
121+
name: 'Scumbag Katz'
122+
}
123+
}, {
124+
type: 'person',
125+
id: '3',
126+
attributes: {
127+
name: 'Scumbag Bryn'
128+
}
129+
}],
130+
links: {
131+
first: '/foo?page=1'
132+
}
133+
};
140134

141-
assert.equal(recordArray.get('links.first'), '/foo?page=1', 'expected links.first to be "/foo?page=1" from payload');
135+
run(function() {
136+
var records = store.push(payload);
137+
recordArray.loadRecords(records, payload);
142138
});
143-
}
139+
140+
assert.equal(recordArray.get('links.first'), '/foo?page=1', 'expected links.first to be "/foo?page=1" from payload');
141+
});
144142

145143
test('recordArray.replace() throws error', function(assert) {
146144
var recordArray = store.recordArrayManager

0 commit comments

Comments
 (0)