Smilies in Rails using RedCloth
RedCloth doesn’t come with support for smilies, so i’ve added it for one of my projects.
You need to extend the RedCloth class. You could do this by creating a file in your /lib directory, which you have to include in your environment.rb. Here an example for three simple smilies:
class RedCloth
def glyphs_smilies(text)
[...]
Filed under: English, Rails 2.0, Rails 2.1, Ruby, Ruby On Rails on July 2nd, 2008 | 1 Comment »