Skip to content

Commit 85304a9

Browse files
committed
Bug fix
Signed-off-by: Bhavya Aggarwal <bhavyaaggarwal1209@gmail.com>
1 parent 7969787 commit 85304a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/pods/questions/new/route.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { inject as service } from '@ember/service'
44
export default Route.extend({
55
currentUser: service(),
66
model () {
7-
return this.store.createRecord('question', {
8-
user: this.get('currentUser.user')
9-
})
7+
const newQuestion = this.store.createRecord('question', {})
8+
newQuestion.set('user', this.get('currentUser.user'))
9+
return newQuestion
1010
},
1111
setupController (controller, model) {
1212
controller.set("question", model)

0 commit comments

Comments
 (0)