I have an application in which I create a file in the controller, and
then in the view I want to be able to provide a link to that file for
the user. (the file could be a .doc, or .pdf, say)
In the controller I do something like this:
@foo = 'foo.doc'
foofile = File.new(@foo, 'w')
... write info to file, and then close it
In the view, I have tried every which way to provide a link 'foo.doc'
but without success.
For example, if I just put in the HTML for the file it gets resolved
something like "localhost:3000/foo.doc" and then I get an error because
that isn't an action.
many thanks in advance for any help you can give.