title: How to add data attribute in Rails form select tag?
body: <p>I found this <a href="http://silviomoreto.github.io/bootstrap-select/" rel="noreferrer">Bootstrap Select</a> project and its <a href="https://github.com/Slashek/bootstrap-select-rails" rel="noreferrer">gem for Rails</a>. I want to implement search in the select tag.</p>
  
  <p>I do inspect element and here is the HTML source:</p>
  
  <pre><code>&lt;select class="selectpicker" data-live-search="true"&gt;
    &lt;option&gt;Hot Dog, Fries and a Soda&lt;/option&gt;
    &lt;option&gt;Burger, Shake and a Smile&lt;/option&gt;
    &lt;option&gt;Sugar, Spice and all things nice&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How do I add <code>data-live-search="true"</code> inside my form select tag?</p>
  
  <p>My form select:</p>
  
  <pre><code>&lt;%= f.select :food_id, options_for_select(Food.all.map{|c| [c.name, c.id]}, f.object.food_id), {}, {class: "form-control selectpicker"} %&gt;
  </code></pre>
  
  <p>What I've tried:</p>
  
  <pre><code>&lt;%= f.select :food_id, options_for_select(Food.all.map{|c| [c.name, c.id]}, f.object.food_id), {}, {class: "form-control selectpicker", data: "live-search"} %&gt;
  </code></pre>
  
  <p>But it's not working.</p>