9 lines
234 B
Ruby
9 lines
234 B
Ruby
|
class FilesController < ApplicationController
|
||
|
def download
|
||
|
uploader = Note.find(params[:id]).attachment
|
||
|
uploader.retrieve_from_store!(params[:filename])
|
||
|
send_file uploader.file.path, disposition: 'attachment'
|
||
|
end
|
||
|
end
|
||
|
|