-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Intent to RFC: make the default router dynamic segments camelCase. #556
Comments
Deprecation of Implicit Record Loading: #557 |
I'm closing this due to inactivity. This doesn't mean that the idea presented here is invalid, but that, unfortunately, nobody has taken the effort to spearhead it and bring it to completion. Please feel free to advocate for it if you believe that this is still worth pursuing. Thanks! |
I think we should still do this -- and ember-cli/eslint-plugin-ember#410 still open. snake_case is just weird in JS |
Closing the ticket doesn’t mean we shouldn’t do it, just that, as it is, there’s no path forward for it. In other words, no one has or is putting in the work to make it happen. In practice, that means it’s not going to happen and, unfortunately, the tickets just end up adding more clutter. |
Today, the default dynamic route segments are
:snake_case
. This is a ruby/rails-ism.In JS, we use
camelCase
and today, using:camelCase
works.Additionally, there are conflicting lint rules:
model({ post_id })
will error becausepost_id
is notcamelCase
. eslint: camelcasebut
this.route('show', { path: ':postId' })
will error because the param is not snake_case. ember/routes-segments-snake-caseAlso, this should be deprecated (maybe as a separate RFC), because it adds additional behaviour based on a convention of snake_case:
lib/system/route#model
(comment / id parse regex)We don't really need implicit model finding (
lib/system/route#findModel
), as we haven't been teaching that for a while.It implies we have a
store
service, which not all ember-apps do.The text was updated successfully, but these errors were encountered: