Ruby on rails rails图像路径渲染绝对路径
我知道镜像路径应该生成一个相对路径;然而,对我来说,它生成了一个绝对值,破坏了我的代码 在我的haml文件中: 呈现:Ruby on rails rails图像路径渲染绝对路径,ruby-on-rails,Ruby On Rails,我知道镜像路径应该生成一个相对路径;然而,对我来说,它生成了一个绝对值,破坏了我的代码 在我的haml文件中: 呈现: http://localhost:3000/mailers/my_image.png 你试过把它改成“mailers/my_image.png”吗?前导正斜杠通常用于生成绝对路径 您使用的是哪个rails版本?我使用的是rails~>4.2 http://localhost:3000/mailers/my_image.png
http://localhost:3000/mailers/my_image.png
你试过把它改成“mailers/my_image.png”吗?前导正斜杠通常用于生成绝对路径
您使用的是哪个rails版本?我使用的是rails~>4.2
http://localhost:3000/mailers/my_image.png