javascript - Not able to create a new record -
I am trying to do this work for countless hours. I am not able to find an answer, which I can understand on the web. Other beginners like me can have an issue I have, so I am posting my question:
I get this error in my Eber App: Unmute Error: Expiration failed: You can only add a 'user' record in this regard
I am trying to create a new record of "Cond". But I'm unable to add the 'User' object to the newly created Cond instance attribute. However, with Chrome debug tool, I can see that 'User' is not zero or undefined. Here is the controller which is the accident:
App.BookController = Ember.Controller.extend ({Requirements: 'User', User: Ember.computed.alias ("Administrator. User"), Frequency : ['Every minute', 'every day', 'every day', 'every week', 'every month', 'every quarter', 'every year', 'continuous'], desired: 'Every month' , Verbs: {CreateCond: function () {var user = this.get ('user'); var comp = it.store.creterker ('canned', {name: this.get ('name'), frequency: this .get ('selected' frequency), Description: this.get ('description'), created Sync: (Conditions); Cond.set ('user', user); // application crashes its user. AddObject ('Conds', Cond); Cond.save (). ) {User.save (); console.log ('created new condom');})}}}}); Thank you for your help!
Your user grabbing a controller, the property is a property on the controller
Either the alias Change:
User: Ember.computed.alias ("controllers.user.model"), or retrieve your:
var user = this.get ('user.model');
Comments
Post a Comment