diff --git a/app/adapters/index.js b/app/adapters/index.js new file mode 100644 index 0000000..af05dc5 --- /dev/null +++ b/app/adapters/index.js @@ -0,0 +1,11 @@ +import adapter from 'ember-data-endpoints/adapter'; + +export default adapter.extend({ + host: '', + queryParams: { + include: 'chapters', + filter: { + published_after: '1990-01-01' + } + } +}); diff --git a/app/routes/index.js b/app/routes/index.js index 7c6f640..52869f4 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -2,12 +2,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ model: function() { - return this.store.find('book', { - include: "chapters", - //'filter[published_after]': '1990-01-01' - filter: { - published_after: '1990-01-01' - } - }); + return this.store.find('book'); } }); diff --git a/tests/unit/adapters/index-test.js b/tests/unit/adapters/index-test.js new file mode 100644 index 0000000..6b2a6d9 --- /dev/null +++ b/tests/unit/adapters/index-test.js @@ -0,0 +1,12 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('adapter:index', 'Unit | Adapter | index', { + // Specify the other units that are required for this test. + // needs: ['serializer:foo'] +}); + +// Replace this with your real tests. +test('it exists', function(assert) { + var adapter = this.subject(); + assert.ok(adapter); +});