Ορέστης Καπλάνης

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Render a Rails resource with a React Component

Hey there @Simon. In my case i had exactly the same issue and i fixed it with this:
all things are correct. try to change the code in controller just like this:

def index
roasts = Roast.all
respond_to do |format|
format.html
format.json { render json: roasts}
end
end

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.