lundi 25 avril 2016

Ember 2.4.3 registration form using account and user model

I am right now facing the signup form in Ember2.4.3. The problem is I have two model account and user, where account belongs to user and user belongs to account.

in my signup.js route,

model() {
  model: this.store.createRecord('account');
}

where as in form I have added like







model for account is

user: DS.belongsTo('user'),
kind: DS.attr('string')

where user has firstname, lastname, email and username.

When I use account as a model for signup form, the user: { data: null } in the jsonapi response.

Can anyone help me here, that would be great.




Aucun commentaire:

Enregistrer un commentaire