Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

<% Produto.all %> não reconhecido

Quando efetuo a declaração do <% Produto.all %> ele não é reconhecido como um código Rails, ele simplesmente é interpretado como html.

Estou usando Visual Studio Code para trabalhar com os arquivos.

<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

    <table>
        <thead>
            <tr>
                <th>Nome</th>
                <th>Descrição</th>
                <th>Preço</th>
                <th>Quantidade</th>
            </tr>
        </thead>

        <tbody>
            <% Produto.all %>
            <tr>

            </tr>
        </tbody>
    </table>

</body>
</html>
1 resposta
solução!

Oi Gabriel, pelo jeito, não deveria aparecer nada no seu HTML. A tag que imprime algo vindo do Ruby/Rails tem um igual:

<%= Produto.all %>