Nathan Moreira
Nathan Moreira

Reputation: 11

How to insert the "data-empreendimento-id" property in each option?

<%= 
    f.grouped_collection_select(:produto_id,
      Town.ativos_com_empreendimentos, 
      lambda { |town| town.empreendimentos.releaseds }, 
      :nome, :produto_id, :nome, 
      { include_blank: "Selecione um empreendimento!" }) 
  %>

How to put a data-attribute in each option, maintaining this structure?

Upvotes: 0

Views: 8

Answers (0)

Related Questions