You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in store.recordWasInvalid(this, errors); throws an error Uncaught TypeError: internalModel.adapterDidInvalidate is not a function.
reading the source code of ember-data I found this
// ===== InternalModel// FOR USE DURING COMMIT PROCESS/** @method adapterDidInvalidate @private*/
adapterDidInvalidate: function(errors){varrecordErrors=this.getErrors();ember$data$lib$system$model$internal$model$$forEach.call(Ember.keys(errors),function(key){recordErrors.add(key,errors[key]);});this._saveWasRejected();}// ===== InternalModel/** This method is called once the promise returned by an adapter's `createRecord`, `updateRecord` or `deleteRecord` is rejected with a `DS.InvalidError`. @method recordWasInvalid @private @param {InternalModel} internalModel @param {Object} errors*/
recordWasInvalid: function(internalModel,errors){internalModel.adapterDidInvalidate(errors);}
in
store.recordWasInvalid(this, errors);
throws an errorUncaught TypeError: internalModel.adapterDidInvalidate is not a function
.reading the source code of ember-data I found this
I think you should not call that method manually, instead make something like this: https://github.com/dockyard/ember-validations/blob/master/addon/validators/local/inclusion.js#L23
The text was updated successfully, but these errors were encountered: