I have a select_tag and making one option value as default and i want to make some option as disabled based on a condition
<% disabled_option = ["options for disabled"]%>
<%= select_tag "product_dropdown", options_for_select(ProductType.get_all_products, @type), {:disabled => disabled_options} %>
the above code is throwing an error wrong number of arguments (3 for 2) even I have used
<%= select_tag "product_dropdown", options_for_select(ProductType.get_all_products, @type, {:disabled => disabled_options}) %>
This is also not working how can i do that
Aucun commentaire:
Enregistrer un commentaire