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

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.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.