How to get the list of all engines in Rails 3 app

前端 未结 3 1627
醉梦人生
醉梦人生 2021-02-09 05:10

According to Rails engines extending functionality in Rails 2.x one could do

Rails::Initializer.new(Rails.configuration).plugin_loader.engines

3条回答
  •  故里飘歌
    2021-02-09 05:40

    As of 5/10/2011 and Rails 3.1 beta, it's now

    Rails::Application::Railties.engines
    

提交回复
热议问题