jeudi 24 août 2017

Ember model fields with number don’t get underscored properly

I have some fields in my order model: address1 and address2. They need to be sent to my API as address_1 and address_2.

When I run Ember.String.underscore inside of keyForAttribute I get:

Ember.String.underscore('address1')
"address1"

Any ideas how I can explicitly tell Ember what to do with these?




Aucun commentaire:

Enregistrer un commentaire