Answer the question
In order to leave comments, you need to log in
Explain what is wrong?
I started to learn rails, found video tutorials, but there is a very old version of rails and because of this there are errors.
Can you help? What is the error and how to fix it?
Here is the code:
class ItemsController < ApplicationController
def index
@items = Item.all
render text: @items.map { |i| "#{i.name}: #{i.price}"}.join("<br/>")
end
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question