Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Make Models Extendable by moving to /addon #67

Open
hhff opened this issue May 14, 2015 · 3 comments
Open

[core] Make Models Extendable by moving to /addon #67

hhff opened this issue May 14, 2015 · 3 comments

Comments

@hhff
Copy link
Owner

hhff commented May 14, 2015

No description provided.

@cellis
Copy link

cellis commented Mar 5, 2016

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.

@cellis
Copy link

cellis commented Mar 7, 2016

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`

@hhff
Copy link
Owner Author

hhff commented Mar 7, 2016

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants