Created
November 17, 2021 09:23
-
-
Save wowremywang/a90e8aef4fd48c9b5dddffac2ddf9ee1 to your computer and use it in GitHub Desktop.
Form Helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add data attribute to option | |
<%= select_tag :addon, options_for_select(@addons.map {|d| [d.name, d.sku, {'data-addon' => d.sku.downcase }]}) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment