In my previous post I posted several small Rails tips, one of which was a cleaner RedCloth helper. Unfortunately, this helper requires that the textile is parsed each time the page is loaded, and that can get nasty. So it our item is a text field called details, just add a details_html field to your model… then create a private conversion method that you call using a before_filter.
Something like:
before_filter :convert_details def convert_details return if self.details.nil? self.details_html = RedCloth.new(self.details).to_html end
Then just display details_html in your view instead. This way the textile only gets converted when you save and make changes to it.