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

can.fixture no longer says id 1 and id "1" are the same #742

Closed
justinbmeyer opened this Issue Feb 18, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@justinbmeyer
Contributor

justinbmeyer commented Feb 18, 2014

Its common to have ids on objects as numbers, but make requests with the string equivalent. can.fixture should be able to handle it.

VOTE HERE: http://bithub.com/event/30391

@shcarrico

This comment has been minimized.

Show comment
Hide comment
@shcarrico

shcarrico Feb 18, 2014

Contributor

is there an advantage to the ID being a number? can we force to set them as strings to start with so there isn't a type mismatch?

Contributor

shcarrico commented Feb 18, 2014

is there an advantage to the ID being a number? can we force to set them as strings to start with so there isn't a type mismatch?

@justinbmeyer justinbmeyer added the Bug label Feb 18, 2014

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 18, 2014

Contributor

@shcarrico Force both ids? But using == where you want type coercion makes sense. Otherwise, where should == be used.

Contributor

justinbmeyer commented Feb 18, 2014

@shcarrico Force both ids? But using == where you want type coercion makes sense. Otherwise, where should == be used.

@daffl daffl added this to the 2.0.6 milestone Feb 18, 2014

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Mar 13, 2014

Contributor

I noticed this, too and this should probably be a JSHint exception. I wanted to write a test, do you have a quick example for what is failing?

Contributor

daffl commented Mar 13, 2014

I noticed this, too and this should probably be a JSHint exception. I wanted to write a test, do you have a quick example for what is failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment