Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ianstarz/940560bbbac000c53f26 to your computer and use it in GitHub Desktop.
Save ianstarz/940560bbbac000c53f26 to your computer and use it in GitHub Desktop.
# GET /project_uploads/1/download
def download
authorize! :download, ProjectUpload
@project_upload = ProjectUpload.find(params[:id])
redirect_to(@project_upload.attachment.expiring_url(10))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment