简体   繁体   中英

create a list box in ruby on rails

Is there a simple way to present values in a list box in Ruby on Rails ? (something like adding the html select tag multiple attribute in ruby)

你是这个意思?

select_tag "list[]", options_from_collection_for_select(@collection, "id", "name"), :multiple=>true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM