app/helpers/documents_helper.rb in social_stream-documents-0.3.3 vs app/helpers/documents_helper.rb in social_stream-documents-0.4.0

- old
+ new

@@ -9,18 +9,22 @@ end def thumb_file_for(document, size) document.thumb(size, self) end - + + def image_tag_for (document) + image_tag download_document_path document, + :id => dom_id(document) + "_img" + end + def link_for_wall(document) format = Mime::Type.lookup(document.file_content_type) - url_for(document)+"."+format.to_sym.to_s+"?style=thumb0" + + polymorphic_path(document, :format => format, :style => 'thumb0') end - def wrap_file_name(name) - name - if(name.length > 12) - name[0,12]+"..." - end + def show_view_for(document) + render :partial => document.class.to_s.pluralize.downcase + '/' + document.class.to_s.downcase + "_show", + :locals => {document.class.to_s.downcase.to_sym => document} end end