I have this scenario:
A Controller called Product.
I have a folder set up as /app/views/product/product1/documents
and a document called test.pdf residing in the above folder.
I have a view file called full_list.rhtml residing in /app/views/
And in full_list.rhtml I have this link Test.pdf
When I click that link, I get this error:
no route found to match “/product/product1/documents/test.pdf”
Obviously I’m not doing things right. But I just don’t know what it is
I’m not doing right.
A second question concerning good ROR practices - where in the ROR
directory structure should I put documents (such as test.pdf) that I
wish user to have access to? Since these are restricted documents, I’m
concerned about having them in the public folder.
Any help would be greatly appreciated since I have spent hours trying
to figure this thing out.