All,
I would like a new record that is created with the new.html.erb page
to always populate a specific variable with a default value.
The simplest way would be to have a check_box that defaults to checked
when the page is loaded, but this seems to be tricky.
Current code looks something like
form_for(@foo) do |f|
...
check_box(:f, :this_should_always_be_yes_from_this_form, {}, 1, 0)
1. Can I set this value automatically?
2. Can I get the check box to default to "yes"?
Thanks,
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---