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

ids in fixtures can't be '0' #167

Closed
Eptis opened this issue Jun 10, 2015 · 4 comments
Closed

ids in fixtures can't be '0' #167

Eptis opened this issue Jun 10, 2015 · 4 comments

Comments

@Eptis
Copy link
Contributor

Eptis commented Jun 10, 2015

Is there a specific reason for this? Ember cli mirage currently replaces my id's with a different number which interferes with my ui and tests.

@samselikoff
Copy link
Collaborator

Does the integer 0 work?

This has to do with some string coercion going on, to make the db operations consistent (e.g. db.find(id)).

@Eptis
Copy link
Contributor Author

Eptis commented Jun 10, 2015

Currently using integers but it doesn't work, should I use strings?

@samselikoff
Copy link
Collaborator

It's because of this: https://github.com/samselikoff/ember-cli-mirage/blob/master/addon/db.js#L55

I'll change it to explicitly check for undefined

@samselikoff
Copy link
Collaborator

Should be all set! You can get this version now with

"ember-cli-mirage": "samselikoff/ember-cli-mirage#8d57d81b75b1c58fd510d79ccbdf1b1f84cac999"

in your package.json.

samselikoff added a commit that referenced this issue Aug 11, 2015
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