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

前端 未结 3 753
名媛妹妹
名媛妹妹 2021-02-09 05:19

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:36

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

    Rails::Application::Railties.engines
    

提交回复
热议问题