title: How to add data attribute to options in haml while using association
body: <p>I am actually working on an ROR application and actually stuck with one thing. I am trying to add data-attribute to options of a select menu. I have tried many things but nothing worked.</p>
  
  <p>Here is the code for select</p>
  
  <pre><code>- options = { collection: Table.active_leads.includes(:table1).all , input_html: {class: 'form-control'}, label_method: :get_label_text, label: "Select"}
  - options[:selected] = params[:add_to_job] if params.has_key? :add_to_job
  = f.association :job, options
  </code></pre>
  
  <p>Any kind of help will be highly appreciated, thanks.</p>