Skip to content

Instantly share code, notes, and snippets.

@jmdfm
Last active December 14, 2015 23:39
Show Gist options
  • Save jmdfm/5166858 to your computer and use it in GitHub Desktop.
Save jmdfm/5166858 to your computer and use it in GitHub Desktop.
Request URL:http://192.168.10.200:3000/archives/1
Request Method:GET
Status Code:200 OK
Returns:
archive: {id:1, name:numbers, archive_item_count:60,…}
archive_items: [{id:1278, original_subject:Stack Overflow Careers -- Email Verification,…},…]
EVERYTHING A-OK! List of items displays perfectly in the View.
AND THEN... Type 'welcome' into the search box which fires this code:
performSearch: function() {
var ars;
if (this.get('searchTerm') === '') {
return;
}
ars = SafeKeepIt.Archive.find({
id: this.get('content').id,
search_term: this.get('searchTerm')
});
return this.set('model', ars);
}
Request URL:http://192.168.10.200:3000/archives?id=1&search_term=welcome
Request Method:GET
Status Code:200 OK
Returns:
archive: {id:1, name:numbers, archive_item_count:60,…}
archive_items: [{id:1278, original_subject:Stack Overflow Careers -- Email Verification,…},…]
Uncaught Error: assertion failed: Your server returned a hash with the key archive but you have no mapping for it ember.js:52
Ember.assert ember.js:52
DS.JSONSerializer.DS.Serializer.extend.sideload ember-data.js:6559
DS.JSONSerializer.DS.Serializer.extend.extractMany ember-data.js:6503
superWrapper ember.js:884
DS.Adapter.Ember.Object.extend.didFindQuery ember-data.js:7112
(anonymous function) ember-data.js:7955
(anonymous function) ember.js:4064
Ember.handleErrors ember.js:401
invoke ember.js:4062
tryable ember.js:4252
Ember.tryFinally ember.js:1039
Ember.run ember.js:4256
ajax.success ember-data.js:7954
fire jquery.js:1038
self.fireWith jquery.js:1149
done jquery.js:8075
callback
SAD TROMBONE ¯\_(ツ)_/¯
Same controller action returning the same JSON packet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment