I currently am using carrierwave to upload files to active admin. The way I have it now, I can successfully upload files. The problem now is that I cannot download the files once they are uploaded. Here is my uploads.rb file.
ActiveAdmin.register Upload do
form(:html => { :multipart => true}) do |f|
f.inputs "Upload" do
f.input :name
f.input :attachment
f.input :user_id
f.input :upload_type
end
f.actions
end
index do
column :name
column :attachment do |upload|
link_to upload.attachment_url.to_s unless upload.attachment_url == nil
end
column :user_id
column :upload_type
default_actions
end
show do
attributes_table do
row :name
row :attachment do |upload|
link_to upload.attachment_url.to_s unless upload.attachment_url == nil
end
row :user_id
row :upload_type
end
end
end
When I go to the index or show view, the file (in this example my resume) looks to be uploaded correctly but I cannot download the link once I click on it.