1 thought on “My variable shows everything, anyway to just show certain values?”

  1. `<%= %>` will render what’s inside the tag to the screen, whatever it is. Just like if you are in irb and entered `@menu`.

    Do you mean you want certain values? `<%= @menu[0]['name'] %>`

    Or do you want help making some HTML?

    <% @menu.each do |row| %>

    <% row.each do |key, value| %>

    <% end %>

    <% end %>

    <%= key %> is <%= value %>

    Obviously this is terrible HTML, but hopefully you can see how it’s done.


Leave a Comment