Rails Simple Form custom association select field

For the records, it seems that this is working now:

f.association :product, collection: Product.all.map { |product| [product.name, product.id, {data: {description: product.description}}] }

SimpleForm version:

$ bundle show simple_form
/Users/josh/.rvm/gems/ruby-2.4.1@a4aa2/gems/simple_form-4.1.0

Use the Rails select() form helper, wrapped by a SimpleForm input.

 <%= f.input :in_charge do %>
   <%= f.select :county_id, User.lawyer.map{ |l| [l.name, l.id, {:name => l.name.downcase}] } %>
 <% end %>

Your code doesn't work as expected because, under the hood, SimpleForm calls collection_select() which doesn't support extra attributes in the option tags.

The SimpleForm readme has the solution as well. But I didn't notice that until I had solved the problem myself :)