在轨道上的红宝石3.1移动.swf资产管道? [英] ruby on rails 3.1 move .swf to asset pipeline?
本文介绍了在轨道上的红宝石3.1移动.swf资产管道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以将SWF文件移动到资产管道中,如果可能的话,怎么做到这一点?
解决方案
建议把它们放在名为 app / assets / flash
的文件夹中。
config.assets.paths<< Rails.root.join('app','assets','flash')
在您的意见中引用如下:
$ p $ lt; code> asset_path('name_of_swf')
asset_path帮助程序将确保在开发和生产模式中引用了正确的文件。
Is it possible to move SWF files to the asset pipeline, and if possible how can this be done?
解决方案
I would recommend putting them in a folder called app/assets/flash
.
Add this folder to your asset paths:
config.assets.paths << Rails.root.join('app', 'assets', 'flash')
They can be referenced like this in your views:
asset_path('name_of_swf')
The asset_path helper will ensure the correct file is referenced in development and production modes.
这篇关于在轨道上的红宝石3.1移动.swf资产管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文