DockYard / ember-admin

Admin backend for ember-cli projects
MIT License
241 stars 37 forks source link

List saved models only #33

Closed knownasilya closed 10 years ago

knownasilya commented 10 years ago

Currently if you click 'Create', you get a blank entry in the index table. I don't think this is the intended behavior, so this fixes it.

If I'm wrong, just close this :smile_cat:.

bcardarella commented 10 years ago

I think it is best to have a guard during the save to server action. So if the server returns any errors it will prevent any transitions

knownasilya commented 10 years ago

The blank entry shows up before save.

bcardarella commented 10 years ago

That's strange. Because https://github.com/dockyard/ember-admin/blob/master/addon/mixins/routes/model-records/write.js#L21-L23 is the action that handles the transition.

So you're saying that you hit Create and it transitions to the index before hitting the server?

knownasilya commented 10 years ago

create-record

bcardarella commented 10 years ago

Oh I see, that makes sense now. Thank you for the video. I would like to have a test for this to cover regressions. You should be able to just do a simple acceptance test that counts the rows on the index after you hit Create

knownasilya commented 10 years ago

@bcardarella test added.

bcardarella commented 10 years ago

Thanks!