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

Add user skills #163

Merged
merged 1 commit into from Jun 14, 2016
Merged

Add user skills #163

merged 1 commit into from Jun 14, 2016

Conversation

joshsmith
Copy link
Contributor

This has no tests and the input's not there yet. Lots of work left to do.

Big thing I can use help on at this point is the highlight-substrings helper. I'm down a rabbit hole and can't see my way out with that one.

@joshsmith
Copy link
Contributor Author

@begedin could use your help on this.

@begedin
Copy link
Contributor

begedin commented Jun 10, 2016

@joshsmith Looks very clean to me. I got no remarks, component or any other part of the code.

@joshsmith
Copy link
Contributor Author

@begedin this is mostly done, it just needs a review and also needs some love on these tests. I can't figure out why they're passing on their own but failing in other instances. Can you take a look?

@joshsmith
Copy link
Contributor Author

Weird. The tests pass here but not in my browser when run all at once.

@begedin
Copy link
Contributor

begedin commented Jun 14, 2016

@joshsmith Tests run fine on my machine. Could be it's the same issue I had in #120. I Updated the dependencies, so try pulling the latest, running bower up and testing again.

this.get('/skills');
this.get('/user_skills');

// TODO: Make this work when relationships work
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which part of this doesn't work? A join model should be fine, since, unlike projects, there isn't a user -> skill many-to-many relationship here, just a user > userSkills, and skill > userSkills.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm misunderstanding then. I can remove this TODO in that case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might even be able to outright remove the custom function and just have this.post('/user_skills')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the case for user-skill, user-role, and user-category then, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@begedin I don't think I can. I think Sam mentioned this was still many-to-many so it wouldn't work because Mirage doesn't support it out of the box right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a many to many, though

It's a one-to-many user -> userSkill and a one-to-many skill -> userSkill. user -> skills would be a many to many relationship, but we don't have that on our model here. What we have is what mirage should already be supporting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, I would try and remove this custom method and see if the tests run without it. I believe they should.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let me verify.

@begedin
Copy link
Contributor

begedin commented Jun 14, 2016

looks good. there's that one question, because I'm not understanding why it doesn't work, but other than that, seems fine.

Update config to be alpha ordered
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

Successfully merging this pull request may close these issues.

None yet

2 participants