标签: ruby-on-rails ruby
有没有一种简单的方法在Ruby on Rails的列表框中显示值? (比如在ruby中添加html select tag multiple属性)
答案 0 :(得分:8)
你是说这个?
select_tag "list[]", options_from_collection_for_select(@collection, "id", "name"), :multiple=>true