Bick
Bick

Reputation: 18521

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)

Upvotes: 0

Views: 3953

Answers (1)

Matzi
Matzi

Reputation: 13925

You mean this?

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

Upvotes: 8

Related Questions