Skip to content

Instantly share code, notes, and snippets.

@axilaris
Created March 14, 2014 11:04
Show Gist options
  • Select an option

  • Save axilaris/9545755 to your computer and use it in GitHub Desktop.

Select an option

Save axilaris/9545755 to your computer and use it in GitHub Desktop.
<%= select "item_tax_data", "item_tax_data",
@tax_array.each_with_index.map {
|jsondata, index|
[jsondata["abbreviation"] + " - " + jsondata["tax_percentage"].to_s + "%",
jsondata.to_json]}, :selected => item["tax_category"].to_json
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment