Forum: Ruby on Rails Puzzled by "radio_button".

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
MenDAKE (Guest)
on 2006-04-07 02:39
I have what seems like simple, working code:

<form action="save_dh_options" method="post">
		<legend>DH Work Reports</legend>
		<p>Would you like to fill a work report?</p>
		<p><%= radio_button("user", "enable_report", "yes") %><label
for="yes"> Yes</label><br />
		<%= radio_button("user", "enable_report", "no") %><label for="no">
No</label><br /></p>

	<p><input type="submit" name="save" value="Save Changes" class="button"

The radio_button command is linked to the field user.enable_report,
which is a simple enum("yes", "no"). Field. When I click the submit
button the data is saved just fine to the database, but the radio
buttons do not reflect the changes. They're always set to "Yes". Can
anyone tell what I'm doing wrong?
MenDAKE (Guest)
on 2006-04-07 23:38
Never mind. Problem eventually solved.
This topic is locked and can not be replied to.