开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜