Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implemented disabled attribute for select_tag form helper #1054
This implements the requested functionality in #872.
You can now tell an option is disabled by setting its third value in the array that describes it as follows:
In the example,
I also implemented this for optgroups since they're subject to being disabled too.
If you're using optgroups as arrays, then again, set set the third item on the array:
For the hash, this was a bit trickier since there wasn't an easy way to tell if the last option was meant to be a boolean value or a directive to tell if you were trying to disable or not the option. Therefore, I decided to force you to use a hash
Thoughts? If you decide to merge this in, let me know and I'll update the docs accordingly. :)
I was thinking about the API for this issue and I reckon that a
If we want to disable