Linking to Files( ie. PDF, DOC etc... )

Ok this is probably a silly question, but is there some special way to link to files?

I have a directory of files that I want my software to automatically display for download. These are forms of different types, some are PDFs, some are DOCs etc.

When I click on the link I create, it appears to be going to the correct filename / url but I get the following error.

no route found to match "/forms/filename.doc" with {:method=>:get}

DO I need to use a specific type of link? I link_to the file as such.

<%= link_to file[0, file.length-4], "forms/"+ file %>

where file is the filename.

Thanks in advance.

Where are the files? They should be in public/forms under your Rails application root.

yeah I was reading from forms/ instead of public/forms

I'm an idiot... Thanks Bob,.