mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
New hash syntax works only with symbol keys
This commit is contained in:
parent
1371b24cce
commit
7f5a1d3359
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ WARNING: when `:inlude_blank` or `:prompt:` are not present, `:include_blank` is
|
|||
You can add arbitrary attributes to the options using hashes:
|
||||
|
||||
```html+erb
|
||||
<%= options_for_select([['Lisbon', 1, 'data-size': '2.8 million'], ['Madrid', 2, 'data-size': '3.2 million']], 2) %>
|
||||
<%= options_for_select([['Lisbon', 1, {'data-size' => '2.8 million'}], ['Madrid', 2, {'data-size' => '3.2 million'}]], 2) %>
|
||||
|
||||
output:
|
||||
|
||||
|
|
Loading…
Reference in a new issue