1

I was giving ember.js a try, and it looks really cool, having MVC architecture in javascript. I followed the todoMVC getting started guide, and everything worked perfectly. I replaced the data adapter with the Parse Data Adapter and it seems to work. But for some reason it affects the actual application by creating the same record twice even though it only runs Todos.Todo.createRecord(..) once.

I was under the impression that the data storage shouldn't have an effect on any of the code before it gets pushed to the data storage, but I may need a little bit of help to work out what is going wrong.

Everything is the same as the getting started tutorial apart from the use of the Parse data storage. It works fine using the localstorage adapter though. Any help would be greatly appreciated!

store.js file:

Todos.Store = DS.Store.extend({
    revision: 11,
    adapter: ParseAdapter.create({
      applicationId: '',
      restApiId: '',
      javascriptId: ''//These filled in appropriately. 
    })
});

todo.js file:

Todos.Todo = ParseModel.extend({
    title: DS.attr('string'),
    isCompleted: DS.attr('boolean')
});

Check out the JSbin:

Todo emberjs + Parse with duplicate problem JSBIN.

PrestaShopDeveloper
  • 3,110
  • 3
  • 21
  • 30
Seb123
  • 471
  • 1
  • 7
  • 20
  • You're running quite an old revision of ember data. I suggest you update a more current version, especially if you're starting out. – Gevious Jun 13 '13 at 19:01
  • 1
    @Gevious I changed to the newest version of ember data, and I also added a link to the code on JSbin. The problem is unfortunately still persisting. – Seb123 Jun 14 '13 at 16:56

0 Answers0