speedmax (owner)

Revisions

gist: 135686 Download_button fork
public
Public Clone URL: git://gist.github.com/135686.git
Embed All Files: show embed
question.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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