Open hhff opened 9 years ago
actually, upon further inspection, I was able to extend the models by doing the following:
# app/initializers/override-user.coffee
`import User from '../models/user'`
`import DS from 'ember-data'`
UserOverride =
name: 'user-override'
before: 'session'
initialize: (registry, application)->
User.reopen
provider: DS.attr()
`export default UserOverride`
Thanks @cellis - I'm in the (sloooow) process of porting Spree Ember over to Solidus - so most new development will eventually happen there. That said - if you do the work in a fork, I'd totally merge it in & release a new version.
Your approach will totally work, however!
Because of this issue, I think i'm unable to move forward with spree-ember. It's going to be really difficult to use without being able to patch the user.js. I tried using an initializer, but i'm unable to import it because it's not in /addon. Will fork for now.