inertia-rails
inertia-rails copied to clipboard
Proper case components will not render
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:
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?
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.