On Nov 24, 6:44 am, "Guru R." <[email protected]> wrote:
> I am new to ruby on rails.i need to create a page with a question and
> multiple choice answers with radio button to answer .i ve stored the
> database in a table with one column ha the question and the other four
> with answers. i ve to populate the fifth column with the answer selected
> with the radio button. is this way approprite for me to go and please to
> guide how to create the radio buttons and how to populate the fifth
> column  with the selected answer.
>
> --
> Posted viahttp://www.ruby-forum.com/.

I do not think the structure you described will accomplish what you
want.  Capturing the selected answer in the same table row as the
question will mean the survey can only have one participant, as
subsequent answer selections would overwrite the previous answer.  You
will likely want to create a survey table, user table, and a
user_survey table that captures each participant's selections.  The
surveys will have many user through the user_survey relationship and
the same for users if they can participate in multiple surveys.

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

Reply via email to