I m using rails-translate-routes gem to translate "front" routes only.
I m using carrierwave to upload some files in my admin. Here s an uploader:
class CheatsheetUploader < CarrierWave::Uploader::Base
[...]
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
[...]
end
如你所知,这条道路正在使用模型的名称和外地名称。
When I try to get the file:
link_to "my file", download.cheatsheet.url
这条道路是:
http://localhost:3000/uploads/download/cheatsheet/1/a_really_nice_file.pdf
铁路给我留下了冰 Rou的错误:
No route matches [GET] "/uploads/download/cheatsheet/1/a_really_nice_file.pdf"
Any way to handle this?