Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update an already existing model #155

Open
g8anusha opened this issue Jul 27, 2017 · 1 comment
Open

Update an already existing model #155

g8anusha opened this issue Jul 27, 2017 · 1 comment

Comments

@g8anusha
Copy link

g8anusha commented Jul 27, 2017

Hi @poteto & others,

I am trying to have more than one validated-form in the page, for the same model, taking a changeset.
Different fields will be applicable for each form. But certain fields in one form, is a computed property of another form (the computed property is given in the model itself, so when we save / get, field is computed and received).

Since they are different forms, and each form creates a new model, the model is not updating the other form. Is there any way in which this can be achieved?

Please find this Twiddle for a similar demo.

Many thanks in advance!

@g8anusha
Copy link
Author

Before model.save, the changes have all the field's value. When model.save is called, only the actually changed values are there. So, this cleans up the actual Ember Data model, and makes the other fields as empty.!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant