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

Proper case components will not render #107

Open
matthewblott opened this issue Oct 23, 2023 · 2 comments
Open

Proper case components will not render #107

matthewblott opened this issue Oct 23, 2023 · 2 comments

Comments

@matthewblott
Copy link

Like React, the convention for Svelte components is to use proper case (LikeThis) but Rails expects the default paths to be lowercase. It works (so far) if I change it to lowercase but I can see issues going forward and there should be a way to accept components named conventionally.

Below is a screenshot of what I had to do to get the show method to work - either use the more explicit render method with a named path as the first argument or change the .svelte file to lowercase:

Screenshot 2023-10-23 at 17 07 16

@BrandonShar
Copy link
Collaborator

Hmm.. I'm not sure we could enable both naming patterns without some heavy handed checks at runtime.

Maybe we could enable this via a setting? Would that solve the issue here?

@matthewblott
Copy link
Author

Hi @BrandonShar thanks for the prompt response. Being able to set this somewhere like the base controller should be fine. Every major front end framework uses proper case, I'm surprised it's not come up already.

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

No branches or pull requests

2 participants