Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Create record from another one

$
0
0

@gagagast wrote:

Hi, I try to create a model in a route file using data from an another record…
What is the best way to achieve this aim ?
I tried this :

model(params) {
    return this.store
      .find("challenge", params.template_id)
      .then(template => this.store.createRecord("challenge", template.toJSON())
      );
  },

But the nested data dissapears…
Thx.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles