Sha256: c205662807a3dbcd6144ee37c5ade6e8eaf31d42f574311b5952d5951582a332
Contents?: true
Size: 483 Bytes
Versions: 23
Compression:
Stored size: 483 Bytes
Contents
class PostAttachmentsController < ForumBaseController # this simple controller is only here to restrict access to post attachments # if the forum is private, and to allow other extensions to add further restrictions def show @attachment = PostAttachment.find(params[:id]) size = params[:size] || 'original' expires_in 1.week, :public => true, :private => false send_file @attachment.file.path(size.to_sym), :type => @attachment.file_content_type end end
Version data entries
23 entries across 23 versions & 1 rubygems