I\'m using JBuilder as to return some JSON. I have a index.json.jbuilder that generates the data, and I need to render it to a string. However, I\'m not sure ho
index.json.jbuilder
Following justingordon's tip.
If you are using a React component, you can do the following.
In your controller:
@users = User.all
In your view:
<%= react_component("YourComponentName", props: render('your_template.json.jbuilder')) %>
This was tested on Rails 5.1.