We have close to 50 help documents, some of which are accessed from two or three different view files. We update these documents and put version numbers in the document itself but would prefer to be able to put the version number into the name of the document as well. The names of the documents are in a database and each document has an id number. Below is a typical link.
<%= link_to "<img src='/images/Question.ico' />", "/downloads/HelpDocument.pdf" %>
I am trying to create a help document management system that will manage the versions and also the links that are in the views.
Is it possible to pass “/downloads/HelpDocument.pdf” into a rails link as variable somehow? Or perhaps place the id of the document somehow into the link?
I don’t want to reinvent the wheel. If there a gem or plugin that is already available to do this kind of thing let me know.
Thanks.
Look here.
You should simply respect:
so this should work: