Have a do loop in HTML supporting a Ruby app:
<% @list.each do |object| %>
<option value="<%= object['name'] %>"><%= object['name'] %></option>
<% end %>
Would like to be able to filter the <option value="<%= object['name'] %>"> item for quotes to preserve the final HTML — is there an easy way to do this?
If this is a Rails app, then I’d suggest using one of the built-in helpers, like so:
If not, then maybe just gsub: