Hi guys. Total newbie here. I’ve been doing web stuff since 1996 but
only began the foray into scripting last year. I haven’t got my skull
completely 360 degrees around OOP yet. It’s just me here (in Japan) and
there are no Ruby groups in my area (never mind any in English).
I’ve got a database table - real simple: question, answer, and id fields
- and I want to pick one question out randomly and output to the HTML
page. Right now I can’t even get single entries out - all I can do is
copy and paste from the scaffolding, so it’s every question or no
questions at this point. I’m not sure if you can put the value into a
variable, like ‘@question’, and then print that, or if i have to do
something like make @question into an intermediary object, like
‘question’, and then do something like ‘question.question’ to make it
print out. Actually, if somebody could just tell me that, even if you
don’t know how to do the random thing, it would be appreciated.