We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7969787 commit 85304a9Copy full SHA for 85304a9
app/pods/questions/new/route.js
@@ -4,9 +4,9 @@ import { inject as service } from '@ember/service'
4
export default Route.extend({
5
currentUser: service(),
6
model () {
7
- return this.store.createRecord('question', {
8
- user: this.get('currentUser.user')
9
- })
+ const newQuestion = this.store.createRecord('question', {})
+ newQuestion.set('user', this.get('currentUser.user'))
+ return newQuestion
10
},
11
setupController (controller, model) {
12
controller.set("question", model)
0 commit comments