I'm trying to generate a dropdown with the alphabet in it. Weird, I know, I'm making an old school arcade style name selector for a game (3/4 letters) selectable with arrow keys.
So far I've got this:
<%= select_tag(:letters) do %>
<% ('A'..'Z').each do |letter| %>
<%= content_tag(:option, letter, value: letter) %>
<% end %>
<% end %>
I'm getting the <select>
tag, but the option
tags are not generated. I'm sure it's just a small syntax error but I'm stumped.
The following should work: