Quickie: How to add a blank option to options_from_collection_for_select

<%= select_tag "some_select", ("<option></option>" + options_from_collection_for_select(@foo, "id", "item")).html_safe %>

One Comment

  1. Joshua Pinter

    You can now pass in a “include_blank: true” options into the “select_tag” method.

Leave a Reply

Your email address will not be published. Required fields are marked *