Displaying 1 result from an estimated 1 matches for "print_question".
2006 Jul 04
1
Smart html output for an object?
Hi, I''m trying to make it so that an object can be easily printed into
the html format I want. I''ve been focusing on using a case/when control
structure, so let me start by showing you some code... I was trying to
use this following code as a helper method,
def print_question(question)
@question = question
case @question.question_type.code
when ''free_response''
text_area(@question, :response, :id => "response_" +
question.id.to_s, :cols => 40, :rows => 10)
else
"boo!"
end
end
this is...