mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-12 18:34:22 +01:00
wire up downloading attachments from todo partial
This commit is contained in:
parent
d769f27e9e
commit
e38a7742f0
2 changed files with 1 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue