,同时从活动管理表的下拉列表中选择多个选项 多个选定项目未显示在索引文件
中form do |f|
inputs 'Contact Group' do
#f.input :contact_id, as: :select, collection: Contact.all, multiple: true
#f.input :contact_id, as: :select, collection: Contact.select(:name).uniq,multiple: true
f.input :contact_id, as: :select, :collection => Contact.all.collect {|contact| [contact.name, contact.id] }, multiple: true
f.input :name
f.input :disable
end
actions
end
index do
id_column
column :contact_id
column :name
column :disable
actions
end