Add check_box/boolean attribute example to README
The ability to set checked and unchecked values on check_boxes (#643) is really hard to find (mapping boolean<->check_box only makes it worse). It seems well worth mentioning it inside the README.
This commit is contained in:
parent
6ce9a15a5a
commit
b4c491dc71
|
@ -217,6 +217,7 @@ the wrapper as well:
|
|||
<%= f.input :date_of_birth, as: :date, start_year: Date.today.year - 90,
|
||||
end_year: Date.today.year - 12, discard_day: true,
|
||||
order: [:month, :year] %>
|
||||
<%= f.input :accepts, as: :boolean, checked_value: true, unchecked_value: false %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue