Skip to content

Instantly share code, notes, and snippets.

@speedmax
Created May 28, 2009 06:24
Show Gist options
  • Save speedmax/119133 to your computer and use it in GitHub Desktop.
Save speedmax/119133 to your computer and use it in GitHub Desktop.
class Question < AbstractContent
acts_as_taggable
serialize :body
def answers
self.body_source
end
def answers_html
self.answers.map do |answer|
BlueCloth.new(answer).to_html
end
end
def answers=(body)
self.body = body
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment