0

我正在尝试在我的项目中实现 Rails 3.1,但我的 image_tags 都没有工作。

我真的需要嵌套的 has_many :through,这就是我选择升级的原因。

我知道 images/javascripts/stylesheets 现在应该进入 app/assets/

但是由于我的主题很复杂,我想将它们公开/

我该怎么做呢?

image_tag、javascript_include_tag 和 stylesheet_tag 仅在资产目录中查找。

控制台输出示例

Started GET "/assets/icons/small/white/Alarm%20Bell.png" for 127.0.0.1 at 2011-05-27 11:04:48 -0400

Served asset /icons/small/white/Alarm%20Bell.png - 404 Not Found  (0.00488s)  (pid 1656)

该文件实际上位于“public/images/icons/small/white/Alarm Bell.png”

谢谢

4

1 回答 1

0

知道了。

在 application.rb 的底部,将资产管道设置为 false。

于 2011-05-29T05:25:18.880 回答