Permalink
Browse files

Add body rendering in model

  • Loading branch information...
jm committed Feb 5, 2010
1 parent af83a5a commit 4730cd4e8601c74a05b9763d307b462f76e44b26
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/models/post.rb
@@ -1,2 +1,7 @@
class Post < ActiveRecord::Base
before_save :render_body
def render_body
self.rendered_body = RDiscount.new(self.body).to_html
end
end

0 comments on commit 4730cd4

Please sign in to comment.