def textilize(text, *options)
      text = h(text) unless text.html_safe? || options.delete(:safe)

      if text.blank?
        ""
      else
        textilized = RedCloth.new(text, options)
        textilized.to_html
      end.html_safe
    end
def textilize(text, *options)
      text = h(text) unless text.html_safe? || options.delete(:safe)

      if text.blank?
        ""
      else
        textilized = RedCloth.new(text, options)
        textilized.to_html
      end.html_safe
    end
Returns the text with all the Textile[http://www.textism.com/tools/textile] codes turned into HTML tags.

 You can learn more about Textile's syntax at its website[http://www.textism.com/tools/textile].
 <i>This method requires RedCloth[http://redcloth.org/] to be installed</i>.

 ==== Examples
   textilize("*This is Textile!*  Rejoice!")
   # => "<p><strong>This is Textile!</strong>  Rejoice!</p>"

   textilize("I _love_ ROR(Ruby on Rails)!")
   # => "<p>I <em>love</em> <acronym title="Ruby on Rails">ROR</acronym>!</p>"

   textilize("h2. Textile makes markup -easy- simple!")
   # => "<h2>Textile makes markup <del>easy</del> simple!</h2>"

   textilize("Visit the Rails website "here":http://www.rubyonrails.org/.)
   # => "<p>Visit the Rails website <a href="http://www.rubyonrails.org/">here</a>.</p>"

   textilize("This is worded <strong>strongly</strong>")
   # => "<p>This is worded <strong>strongly</strong></p>"

   textilize("This is worded <strong>strongly</strong>", :filter_html)
   # => "<p>This is worded &lt;strong&gt;strongly&lt;/strong&gt;</p>"