File preview in Rails

Hello guys,

I'm developing my first Rails real application on my own. I'm facing
this problem: I would like to show a preview of files inside a page,
the kind of files I want to show can vary from image files (ong, jpeg,
gif, ttf ecc) to text-like files (rtf, doc, txt, pdf, ppt ecc). How
can I do that with rails? Any help would be really appreciated! Thank
you in advance.

Regards

Matte

Look this article

http://www.creativewebspecialist.co.uk/2007/10/30/file-type-icons-on-links-using-css-revisited-using-jquery.aspx