parent
e1abc5e4cb
commit
f41f4caccd
17 changed files with 221 additions and 77 deletions
24
app/routes/collections/detail/edit.js
Normal file
24
app/routes/collections/detail/edit.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const { Route, RSVP } = Ember;
|
||||
|
||||
export default Route.extend({
|
||||
model() {
|
||||
const store = this.get('store');
|
||||
const model = this.modelFor('collections.detail');
|
||||
return RSVP.hash({
|
||||
model: model,
|
||||
projectOptions: store.findAll('project'),
|
||||
studyLocationOptions: store.findAll('study-location'),
|
||||
collectionTypeOptions: store.findAll('collection-type'),
|
||||
collectionMethodOptions: store.findAll('collection-method'),
|
||||
});
|
||||
},
|
||||
|
||||
setupController(controller, models) {
|
||||
this._super(...arguments);
|
||||
// Unwrap the parent route's listified model
|
||||
models.model = models.model[0];
|
||||
controller.setProperties(models);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue