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

Support for DataStore imports and syntax #33

Open
jgamedev opened this issue Jun 5, 2016 · 1 comment
Open

Support for DataStore imports and syntax #33

jgamedev opened this issue Jun 5, 2016 · 1 comment

Comments

@jgamedev
Copy link

jgamedev commented Jun 5, 2016

This is what the scaffold gives me:

import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({ [..] });

This is what my model ended up looking after following the Ember official documentation:

import DS from 'ember-data';

const { attr, hasMany } = DS;
export default DS.Model.extend({
  name: attr('string'),
  products: hasMany('product')
});
@marcioj
Copy link
Owner

marcioj commented Jun 6, 2016

For consistency ember generate scaffold delegates the model creation to ember generate model.
I think that creating some option to customize the import will not give any benefit, and make things more confuse. Maybe the ember documentation should be updated to use this new syntax.

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