<%= radio_button_tag(“admin”, “select”, user.id) %>
The current API docs have not been updated to reflect the fact that the
radio button helper creates an input with an id of object_method_value
rather than just object_method. (Remember: “View source” is your
friend.)
Thanks for the reply. Actually, I noticed in the page source that Rails
adds the @user.id part in the ‘id’ of the radio button. I tried your
solution soon after posting my earlier message, but surprisingly it
diidn’t work, although it created the same ‘id’ as the text_field does
I think I’ve got it to wok by not using the radio_button method at all
but simply using the HTML tag like this:
Your solution should work though, don’t know why it doesn’t.
-Aditya
Mark Reginald J. wrote:
Aditya R. wrote:
<%= radio_button_tag(“admin”, “select”, user.id) %>
The current API docs have not been updated to reflect the fact that the
radio button helper creates an input with an id of object_method_value
rather than just object_method. (Remember: “View source” is your
friend.)