padrino/padrino-framework — pull request #1436 by ujifgc (2013-10-08 07:52:42+00:00)
Title: Rails-style options for select

ref #872

```ruby
opts = {
"Friends" => ["Yoda",["Obiwan",2,:magister=>'no'],:lame=>'yes'],
"Enemies" => [["Palpatine","Palpatine",:scary=>'yes',:old=>'yes'],["Darth Vader",3,:disabled=>true]]
}
actual_html = select_tag( 'name', :grouped_options => opts, :disabled_options => [2], :selected => ['Yoda'] )
```
=>

```html

Yoda

Obiwan

Palpatine

Darth Vader

```

If additional API is acceptable, we can close #872

Also I would like to **drop confusing API** with slipping booleans into array of options to disable them like this:

```
opts = {
"Friends" => ["Yoda",["Obiwan",2,true]] # I'm confused
```