Now I want to read the value of the radio button. Eg: if the user chose
“Blue”, then I want to display the user’s name in a table under the
column Blue. I already defined the table in index.html and I have a
model called usertable that I previously defined on the command line
using:
you can always try this when you have that kind of problem:
In your controller:
def whatever
flash[:notice] = params
redirect_to back
end
this will print the params hash if you have a flash message div set up.
The
original way of doing this is by looking at the console, and looking at
the
hash that gets send.
Now I want to read the value of the radio button. Eg: if the user chose
“Blue”, then I want to display the user’s name in a table under the
column Blue. I already defined the table in index.html and I have a
model called usertable that I previously defined on the command line
using:
Keep in mind that radio button need to be defined in a radio button
group. Create the group by using the same value for the name attribute
of each radio button in the group: