I'm using Paperclip to upload a .js
file.
My model (Bypassing validation just for Testing Purposes):
# Script Asset
has_attached_file :asset
do_not_validate_attachment_file_type :asset
The upload itself works as it should, but how to open the uploaded file so i can display it in the View?
I tried and searched a lot, but i can't find a working solution. Just passing <%= @test.asset %>
brings back the path of the Document.
Do i have to write a method for passing the Document to a text
?