Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1250 from PikachuEXE/patch-1

Add doc for option `selected` to README [ci skip]
  • Loading branch information...
commit 43dccaf1cc941b78337577fd4c154594b86f8635 2 parents 7cb9d02 + 2a7cb93
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  README.md
View
3  README.md
@@ -327,8 +327,9 @@ translation. All other options given are sent straight to the underlying helper.
can give prompt as:
```ruby
-f.input :age, collection: 18..60, prompt: "Select your age"
+f.input :age, collection: 18..60, prompt: "Select your age", selected: 21
```
+Extra options are passed into helper [`collection_select`](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_select).
It is also possible to create grouped collection selects, that will use the html *optgroup* tags, like this:
Please sign in to comment.
Something went wrong with that request. Please try again.