开发者

Converting ActionView::Helpers::AssetTagHelper::ASSETS_DIR for Rails 3?

开发者 https://www.devze.com 2023-03-30 08:14 出处:网络
I have a plugin that I would like to use that has the following line in it: PATH_TO_ASSETS = ActionView::Helpers::AssetTagHelper::ASSETS_DIR + File::SEPARATOR

I have a plugin that I would like to use that has the following line in it:

PATH_TO_ASSETS = ActionView::Helpers::AssetTagHelper::ASSETS_DIR + File::SEPARATOR

This is erring now 开发者_StackOverflowwith:

const_missing': uninitialized constant ActionView::Helpers::AssetTagHelper::ASSETS_DIR (NameError)

Any idea how I can get this to work with Rails 3? Thanks


ASSETS_DIR was taken out in Rails 3. It would have been defined as Rails.public_path or 'public' if Rails.public_path was undefined.

ActionController::Base.helpers.config.assets_dir seems to be what it was replaced with

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号