search for: transform_post

Displaying 1 result from an estimated 1 matches for "transform_post".

2006 May 31
0
acts_as_blog
.... You can pass in any of the available filters for each of the markup styles. =============================================================== ## example of posts model class Post < ActiveRecord::Base acts_as_blog ## before we save, we need to transform the markup into html before_save :transform_post has_many :comments # we need to keep the posts table in good shape! validates_presence_of :date, :raw_post, :title, :category, :description ## transform the text into valid html def transform_post self.post = Post.convert_to_html(self.raw_post, ''textile'') end...