Puzzled by "radio_button"

I have what seems like simple, working code:

DH Work Reports

Would you like to fill a work report?

<%= radio_button("user", "enable_report", "yes") %> Yes
<%= radio_button("user", "enable_report", "no") %> No

<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?

Never mind. Problem eventually solved.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs