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

Rails 7 Jbuilder ActionView::MissingTemplate Error #555

Open
kohheepeace opened this issue Sep 18, 2023 · 1 comment
Open

Rails 7 Jbuilder ActionView::MissingTemplate Error #555

kohheepeace opened this issue Sep 18, 2023 · 1 comment
Assignees

Comments

@kohheepeace
Copy link

kohheepeace commented Sep 18, 2023

Problem

In Rails 7, I got an "ActionView::MissingTemplate Error" error when I try to use jbuilder as described in the following document.

https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/docs/jbuilder.md

Solution

❌ Not working

<%= react_component('App', props: render(template: "/comments/index.json.jbuilder")) %>

✅ Working

<%= react_component('App', props: render(template: "/comments/index", formats: :json)) %>

Ref

https://stackoverflow.com/a/74683089/6037441

@ahangarha
Copy link
Contributor

Sorry for this, but this document seems outdated.
I will take a look at the issue and docs in a couple of days and will let you know the result.

Thanks for your report.

@ahangarha ahangarha self-assigned this Sep 18, 2023
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