Rails-如何获取控制器中单个图像资产的URL?
|
我尝试过包括
ActionView::Helpers::AssetTagHelper
,然后使用image_path()
方法,但是这让我感到悲伤:
undefined local variable or method `config\' for ActionView::Helpers::AssetTagHelper:Module
我可能缺少一些简单的东西。有任何想法吗?
没有找到相关结果
已邀请:
1 个回复
死搭胯
似乎对我有用,无需在Controller中包含帮助者