This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.rdoc | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
lib/ | ||
| |
test/ |
README.rdoc
OptionTagsWithDisabled
Enhancements to form option tag helpers.
Disabled option tags
Disabled option tags can now be specified:
<%= options_for_select(['Please choose a size', 'small', 'medium', 'large'], nil, 'medium' ) %>
Gives you:
<option value="Please choose a size">Please choose a size</option>
<option value="s">small</option>
<option value="m" disabled="disabled">medium</option>
<option value="l">large</option>
You can specify a single value or an array of disabled values.
Proc for selected and disabled option tags
options_from_collection_for_select now accepts a proc to identify selected and/or disabled attributes:
options_from_collection_for_select(@products, :id, :name, nil, lambda{|p| p.in_stock? })
Would produce:
<option value="s">small</option> <option value="m" disabled="disabled">medium</option> <option value="l">large</option> <option value="xl">extra large</option>
Where any elements of the collection that are out of stock would be disabled.
Copyright © 2008 Tekin Suleyman, released under the MIT license








