Sha256: 8ac26a9a04d55a37257c623b36d2b1ded4d74aa35654a1adcf531c24e9d5b457
Contents?: true
Size: 521 Bytes
Versions: 5
Compression:
Stored size: 521 Bytes
Contents
module DocumentsHelper FORMATS = ["msword","vnd.ms-powerpoint","msexcel","rar","zip","mp3","plain","pdf"] def thumb_for(document) image_tag document.thumb(self) end def big_thumb_for(document) image_tag document.big_thumb(self) end def link_for_wall(document) format = Mime::Type.lookup(document.file_content_type) url_for(document)+"."+format.to_sym.to_s+"?style=thumb0" end def wrap_file_name(name) name if(name.length > 12) name[0,12]+"..." end end end
Version data entries
5 entries across 5 versions & 1 rubygems