[3.1.0.rc1] Plugins inside engines not eager-loaded properly and their rake tasks ignored #1460

Merged
merged 1 commit into from Jun 16, 2011
Commits on Jun 14, 2011
  1. @jhtwong

    Patch for rails#1460

    jhtwong committed Jun 14, 2011
    [3.1.0.rc1] Plugins inside engines not eager-loaded properly and their
    rake tasks ignored
    
    Working with the new support for plugins inside engines in Rails 3.1,
    I found that certain things that work for regular plugins don't work
    for these new nested plugins. In particular, these methods in
    Rails::Engine don't seem to understand that an engine could have
    nested plugins:
    
    #load_tasks
    #load_generators
    #load_console
    #eager_load!
    
    A solution which worked out for me is to move the calls to
    railties.all { ... } from the overriding methods in Rails::Application
    into Rails::Engine.