表单: RailsNotes
用户: dreamable
创建日期: 2021-04-29 09:48:54 UTC
更新日期: 2021-04-29 09:48:54 UTC
引用:(Table ID 3, Record ID 42)

标题 :
Rails collection_select set value for include_blank
笔记 :

source

options = Carmake.all.unshift Carmake.new(id: 0, name: 'Any')
collection_select(:service, :carmake_id, options, :id, :name, include_blank: 'Any')
标签: