How should I link to a file in my Rails public folder, if the filename has spaces in it? i.e.:
<%=link_to 'Download my file', root_url + "files/my file.zip"%>
You can use URI.escape it will take care of escaping the string for you.
URI.escape("files/my file.zip")
=> "files/my%20file.zip"