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

Homeroom paths: Match by id only, not slug #2588

Merged
merged 3 commits into from
Sep 5, 2019

Conversation

kevinrobinson
Copy link
Contributor

Who is this PR for?

K8 educators with homeroom access

What problem does this PR fix?

This has bitten us twice before: #2022 and #2155. Another case came up again verifying #2584.

In this case, there was a collision between id and slug spaces for homerooms, which caused the navbar link to be generated with a slug, but be interpreted as if it were an id in the controller lookup code.

What does this PR do?

Removes /homerooms/:slug and only generates and supports /homerooms/:id. There's still a footgun here because the url_helpers.homeroom_path(homeroom) will use slug, but that's for another day. Verifying #2584 is more important, and this bug makes that more complicated.

Checklists

Which features or pages does this PR touch?

  • Navbar links
  • Homeroom

Does this PR use tests to help verify we can deploy these changes quickly and confidently?

  • Included specs for changes
  • Improved specs for existing code in need of better test coverage
  • Manual testing made more sense here

@kevinrobinson
Copy link
Contributor Author

selfie

@kevinrobinson kevinrobinson merged commit 99df290 into master Sep 5, 2019
@kevinrobinson kevinrobinson deleted the patch/homeroom-match-by-id branch September 5, 2019 13:41
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.

1 participant