<form action="/votes/vote" method="post">
<% for option in @vote.options %>
<%= option.name %>
<%= option.quantity %>
<input type="checkbox" name="op[]" value="<%= option.id %>" /><br />
<% end %>
<input type="hidden" value="<%= @vote.id %>" name="id"/>
<input type="submit" value="Submit" />
</form>
<%= option.quantity%>
是票数;我想用更直观的图像替换它。如何?
选项1.数量=15;=>: =====15px(柱状图)======
选项1.数量=30;=>:=============30px(柱状图)===============