wire up downloading attachments from todo partial

This commit is contained in:
Reinier Balt 2014-07-06 22:29:19 +02:00
parent d769f27e9e
commit e38a7742f0
2 changed files with 1 additions and 2 deletions

View file

@ -817,7 +817,7 @@ class TodosController < ApplicationController
def attachment
id = params[:id]
filename = params[:filename]
attachment = current_user.attachments.find(id)
attachment = Attachment.where(id: id).first
if attachment
send_file(attachment.file.path,

View file

@ -90,7 +90,6 @@ Rails.application.routes.draw do
get 'convert_to_project' # TODO: convert to PUT/POST
delete 'remove_predecessor' # TODO: convert to PUT/POST
post 'change_context'
get 'attachment'
end
collection do
get 'done'