ruby on rails乘以设置选择功能

时间:2016-04-25 21:17:30

标签: ruby-on-rails ruby select

我目前在表单中有以下选择框:

%h1 Create New Movie

= form_tag movies_path do

  = label :movie, :title, 'Title'
  = text_field :movie, 'title'
  = label :movie,:description,'Description'
  = text_field :movie,'description'


  = label :movie, :rating, 'Rating'
  = select :movie, :rating, ['G','PG','PG-13','R','NC-17','SSS'],:multiple => true

  = label :movie, :release_date, 'Released On'
  = date_select :movie, :release_date

  = submit_tag 'Save Changes'

我想为此选择框添加多个选项,然后添加multiply =>选择功能后为true,但仍然只能选择一个等级。

0 个答案:

没有答案