内容简介:翻译自:https://stackoverflow.com/questions/5049640/how-to-get-the-list-of-all-engines-in-rails-3-app
根据Rails 2.x中的 Rails engines extending functionality
,可以做到
Rails::Initializer.new(Rails.configuration).plugin_loader.engines
此代码在Rails 3中不起作用
ActionController::RoutingError (undefined method `new' for Rails::Initializer:Module): config/application.rb:12:in `require_or_load'
在Rails 3中我需要做什么才能获得这样的引擎列表?
这是 Extending controllers of a Rails 3 Engine in the main app 所必需的
截至2011年10月10日和Rails 3.1测试版,它现在
Rails::Application::Railties.engines
翻译自:https://stackoverflow.com/questions/5049640/how-to-get-the-list-of-all-engines-in-rails-3-app
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。