Results 1 to 13 of 13
Thread: Rails starting questions
Dec 18, 2005, 09:59 #1
- Join Date
- Jun 2003
- Iowa, USA
- 0 Post(s)
- 0 Thread(s)
Rails starting questions
I am trying to learn a bit more about Rails, and at the same time my daughter and I are working on a little project.
We want to make a trivia site that will present questions to a user, and keep totals until they miss a questions, and have a "daily hall of fame" etc.
I have been through the "cookbook" example with rails, but that is about it.
I think you would want to have a Question model. I assume the Question class should
and we would have an Answer class as well. I think we could get as far as that on our own, but I want to validate a couple of questions agains folks who have used this more than me.
Would we need some other controller to run the series of questions, perhaps a Quiz controller? It could then pull a random, not yet asked questions from the database and present it. I assume there is a rails equivalent of a session, would we tuck an array of already asked questions in there?
With the Questions has_many :Answers, how would we designate the correct answer? Would the most rails friendly modeling of this be an attribute on the question or on the Answer?
I am sure more questions will come as we progress, but hopefully someone can chip in on the things I have asked so far. Thanks!