新手问题 CarrierWave 的文件路径查找问题

xlwt2113 · August 31, 2017 · Last by Catherine replied at August 31, 2017 · 894 hits

使用 CarrierWave 时,按照时间建立文件夹保存文件,文件保存时,数据库中只有文件名,很奇怪 CarrierWave 是如何找到不同不同时间建立的文件夹中的文件呢?

类似 paperclip 申明 has_attachment_file 会指明 path,你也可以用 rubymine 直接跳转到 xxx.pic.path 的 path 方法里看它到底怎么拿到完整路径的。

You need to Sign in before reply, if you don't have an account, please Sign up first.