Sha256: e88144a965cde619451ea1d72f6b21d0151c888b9436963b79cc6d37e234a3ea
Contents?: true
Size: 523 Bytes
Versions: 11
Compression:
Stored size: 523 Bytes
Contents
module DocumentsHelper FORMATS = ["msword","vnd.ms-powerpoint","msexcel","rar","zip","mp3","plain","pdf"] #size can be any of the names that the document has size for def thumb_for(document, size) image_tag document.thumb(size, 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
11 entries across 11 versions & 2 rubygems