Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Removes unnecessary resetNamespaces #821

Merged
merged 3 commits into from
Nov 30, 2016
Merged

Removes unnecessary resetNamespaces #821

merged 3 commits into from
Nov 30, 2016

Conversation

locks
Copy link
Contributor

@locks locks commented Nov 24, 2016

This is a code style improvement with no issue associated.

Changes proposed in this pull request:

  • Remove unnecessary { resetNamespace: true } for top-level routes.

cc @HospitalRun/core-maintainers

The routes declared directly beneath Router.map are already top-level, so the reset is unnecessary.
This has the added benefit of removing some visual cruft, because the few resetNamespaces left are actually meaningful, making visual parsing easier, as well as grepping.

The routes declared directly beneath `Router.map` are already top-level, so the reset is unnecessary.
This has the added benefit of removing some visual cruft, because the few `resetNamespace`s left are actually meaningful, making visual parsing easier, as well as grepping.
Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

@locks thanks for the PR! One of the resetNamespaces is needed, so if you can put that back, the tests should pass.

this.route('users', {
resetNamespace: true
}, function() {
this.route('users', function() {
Copy link
Member

Choose a reason for hiding this comment

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

This change is causing tests to fail because users sits at /app/users, not /app/admin/users

@locks
Copy link
Contributor Author

locks commented Nov 30, 2016

@jkleinsc oops, I think I misread the indentation! Do you want me to squash the commits as well?

@jkleinsc
Copy link
Member

@locks I can squish the commits via GithHub, so you don't need to worry about that.

@jkleinsc
Copy link
Member

Thanks @locks! I'll merge it in.

@jkleinsc jkleinsc merged commit a0ad92c into HospitalRun:master Nov 30, 2016
@locks
Copy link
Contributor Author

locks commented Dec 1, 2016

Thanks :D

@locks locks deleted the patch-1 branch December 1, 2016 00:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants