An Ember Ecosystem
For Spree Commerce

spree-ember-core

Extends Ember.Mixin

Include this mixin into any model that sends nested attributes to the Spree server. Currently this is only for the order model.

errors: {
  ship_address.firstname: ["can't be blank"]
  ship_address.country: ["can't be blank"]
}

Will look for the model named "shipAddress" related to the model, and apply errors to it.

Methods

Show Private Methods

_infoForNestedKey

private

Interprets error keys that contain a dot.

_transformCreditCardErrors

private

Massages the strange error response that Spree provides for Credit Card errors.

adapterDidInvalidate

(
  • errors
)

Overrides the DS.Model#adapterDidInvalidate call to apply appropriate errors to related nested objects.

Parameters:

  • errors Object

    A normalized error object returned from the serializer's extractErrors method.