Can I include blank field in select_tag?

前端 未结 4 1945
栀梦
栀梦 2020-12-17 08:58

Is it possible to add an option like :include_blank => \'Please Select\' in a method select_tag like it is possible with the select

4条回答
  •  孤街浪徒
    2020-12-17 09:18

    Note that in Ruby on Rails 3, select_tag() will accept an :include_blank boolean argument (same with date_select and the like).

提交回复
热议问题