ember.js - Ember Transaction has no method add -


i'm attempting create ember transaction commit single model backend api.

coffeescript:

comic = app.comic.createrecord(title: @get('comictitle')) transaction = comic.get('store').transaction transaction.add(comic) transaction.commit() 

which gives javascript error:

uncaught typeerror: object function () {     return ds.transaction.create({ store: });   } has no method 'add' 

i've googled various different ways use ember transactions, i'm not sure i'm going wrong. i'm using latest version of ember data.

the coffeescript js translation may not happening correctly. try changing to

transaction = @get('store').transaction() 

i have found implicit method invocation in coffeescript trips in ember occasionally.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -