From d70661672c011dee060bf1f2493156a351fde4ee Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Tue, 20 Nov 2018 17:49:13 -0300 Subject: [PATCH] Add name attribute to adapter model --- app/models/panda/adapter.coffee | 1 + tests/dummy/app/routes/application.coffee | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/panda/adapter.coffee b/app/models/panda/adapter.coffee index 9acb554..3d4edd4 100644 --- a/app/models/panda/adapter.coffee +++ b/app/models/panda/adapter.coffee @@ -2,6 +2,7 @@ import DS from 'ember-data' export default DS.Model.extend title: DS.attr('string') + name: DS.attr('string') url_name: DS.attr('string') authorizations: DS.attr(defaultValue: -> []) diff --git a/tests/dummy/app/routes/application.coffee b/tests/dummy/app/routes/application.coffee index c3a638d..04a6f67 100644 --- a/tests/dummy/app/routes/application.coffee +++ b/tests/dummy/app/routes/application.coffee @@ -35,8 +35,8 @@ export default Ember.Route.extend DunlopApplicationRoute, @load_backend_settings() ]).catch((reason) => @get('initial_resources_reject')(reason) - ).then (results...) => - @set 'router.globals.adapters', results[4] #.content ? this is a promise, could be an array @store.peekAll('panda/adapter') + ).then (results) => + @set 'router.globals.adapters', results[4].toArray() @get('initial_resources_resolve')() load_backend_settings: ->